Skip to content

feat(snapshot): move scope into presentation - #1855

Open
thymikee wants to merge 1 commit into
mainfrom
codex/1797-step3-scope
Open

feat(snapshot): move scope into presentation#1855
thymikee wants to merge 1 commit into
mainfrom
codex/1797-step3-scope

Conversation

@thymikee

@thymikee thymikee commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Move snapshot scope selection into the platform presentation boundary.

Part of #1797.

Validation

  • pnpm check:affected --run
  • iOS runner build with unit tests enabled
  • 3 targeted Swift scope tests on iOS Simulator
  • 71 focused TypeScript scope and presentation tests
  • non-vacuity mutations: disconnecting Swift scope presentation failed 8 assertions; label-only TypeScript and Swift matching failed identifier/value fixtures

@thymikee

Copy link
Copy Markdown
Member Author

Exact bd59d47e is DIRTY and stale-stacked. Current main already contains #1850 eligibility and #1846 contribution-aware Android scope. This branch reintroduces raw-tree first-match scope in TypeScript and Swift, so a decorative first match later removed by eligibility can yield empty output despite a later contributing match.

Rebase, drop the merged eligibility commit, preserve the first-preorder-match-whose-presented-subtree-contributes contract, and add decorative-first/later-contributing parity plus production-boundary regressions.

The PR body is only stack boilerplate, full CI did not run, and the required live iOS tree/private-AX plus Android evidence is absent.

Use one preorder label/identifier/value policy across Swift and TypeScript, keep scoped iOS acquisition conservative, and remove the daemon's second scope pass.

Non-vacuity: label-only matching failed identifier/value parity fixtures; Android pass-through failed its boundary test; disconnecting Swift applyScope produced eight scope/depth/projection failures.
@thymikee
thymikee force-pushed the codex/1797-step3-scope branch from bd59d47 to 8b1c813 Compare August 18, 2026 17:58
@thymikee thymikee changed the title codex/1797 step3 scope feat(snapshot): move scope into presentation Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.31 MB 2.31 MB +554 B
JS gzip 759.2 kB 759.3 kB +99 B
npm tarball 882.5 kB 883.3 kB +793 B
npm unpacked 3.08 MB 3.08 MB +3.6 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 30.0 ms 29.6 ms -0.4 ms
CLI --help 72.7 ms 70.4 ms -2.4 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/internal/daemon.js -267 B -98 B
dist/src/snapshot.js +5 B +14 B
dist/src/session2.js 0 B -2 B
dist/src/sdk-batch-runner.js -17 B 0 B

@thymikee

Copy link
Copy Markdown
Member Author

Re-reviewed exact 8b1c8130: the rebase/stack issue is fixed, and current-main eligibility plus Android’s contribution-aware scope policy are preserved.

P1 remains on Swift: applyScope selects the first raw semantic match before presentedNodes applies eligibility. A decorative first match whose subtree contributes nothing can therefore produce an empty projection and suppress a later contributing match, contrary to the shared contract and Android implementation. Make Swift selection contribution-aware, then add decorative-first/later-contributing and dropped-container/contributing-child parity plus production-route regressions.

Coverage is red only from inherited #1860 ratchet drift. The body also still needs the required 24-file scope disclosure and specific live private-AX production evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant