← Back to Pull requests

Enforce disclosure policy in dormant native drag materialization #1497

Closed
unknown closed this pull request without merging on Nov 27, 2026 08:36 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 07:09 UTC
Author

Motivation

Refs #1137. Native file promises could open original bytes without consulting disclosure classes. Production native dragging remains disabled after #1027.

Description

  • Require main's public export plan for an unidentified receiver before advertising original promises and again while lazily opening, streaming and completing receiver output.

  • Conservatively require every potential export field to be Public because extraction completeness is not attested; null records cannot authorize apparently absent metadata. Refuse any withheld field and name the fields in the refusal notice while retaining the internal album-drag payload.

  • Recheck current photo identity and protected/locked/deleted custody, release offloaded originals and remove partial receiver output on refusal.

  • Record the public plan's authorized field names in Activity without claiming byte-inspection findings; omit metadata values, filenames, paths, hashes and custody details.

  • Keep native requests original-only with no operation widening. Ordinary Export → Baked remains the alternative.
  • Dependency blocker

    Issue #1137 remains open. #1028 has no signed initiation prototype and is explicitly blocked on that evidence gate. This independent materialization hardening leaves production enabled: false, AppKit initiation and the session redesign unchanged. TestNativeDragBridge does not establish signed initiation, receiver or preview acceptance. The remaining signed native-session acceptance depends on #1028.

    Documentation

    Appended the ADR-0032 posture before implementation. Updated native-drag acceptance to separate automated materialization evidence, disabled production checks and future signed receiver evidence.

    Changeset

  • Patch changeset included.
  • Acceptance coverage

  • Coverage map updated.

  • Real-planner tests cover private GPS, all-null extraction records, refusal of Shared overrides for unknown receivers, scoped policy, stale records, asynchronous policy changes, custody cleanup and Activity redaction.

  • Existing bounded materialization, lock and disabled-bridge tests remain.

  • E2E adds real EXIF-GPS import/refusal and retained internal payload through the materialization harness.
  • Testing

    Passed locally, sequentially:

  • INTEROP_IMAGE_TRAIL_ROOT=/workspace/image-trail npm test — 2,759 unit +117 DOM +1 database-page passed; 10 unit skips. Includes 30 native-drag tests.

  • npm run lint

  • DOCS_GOV_TOOLING_ROOT=/workspace/docs-gov npm run docs:gov

  • npm run format:check

  • npm run check:changesets

  • npm run check:acceptance-coverage
  • The subsequent E2E selector-only correction also passed targeted ESLint, Prettier and npm run typecheck; the app's existing import action is labelled Import 1 photos, and gallery accessible names include comma-separated date/place context.

    CI passed on final head ae469b554ce1f7793cbf7c2c690fee13f4b7571b: complete suite (coverage, build and Storybook), E2E and E2E gate, Windows x64, docs governance, CodeQL and workflow policy checks. The GPS import/refusal and retained internal-payload scenario passes in CI's materialization harness.

    Manual Testing

    Signed native-session evidence is blocked by #1028 and is not claimed. Follow docs/acceptance/Acceptance-Test-Native-Drag-Out.md in a signed build to verify production stays disabled, internal album dragging and inbound Finder/recovery-key drops remain responsive. After #1028 supplies the accepted initiation path, signed receiver testing must verify disclosure refusal/preview, revocation and cleanup.

    <!-- agent-bot-write: ghw_b1b49357e5992453 session=f601b21bf418 bot=trueline-codex-agent[bot] -->

    Diff: 459 lines (+344 / -115) across 5 files Reviewer: qwts Review duration: 86m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 459 lines diff across 5 files
    0.46
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.367
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1497"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.5% (MEDIUM) · Higher = larger blast radius
    45.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.0% · Safe to merge
    18.0%