Repository navigation
fix(refs): refuse reads of refs a partial frame did not issue - #4698
Conversation
A read-only find that prints a ref activates a partial frame over its own capture. A plain @ref from the earlier snapshot was then resolved by number against that newer tree, so get text could silently read another element (callstack#1076). get and wait now refuse such a ref with the existing ref_not_issued reason and a hint that names the partial publication, as ADR 0014 requires for reads without retained evidence. Refs the partial result printed still resolve. Refs callstack#4686
|
The PR is ready at adf612a: reads of refs that a partial frame did not issue are now refused before any backend call, and I found nothing that needs fixing first. CI is green with no failing checks,, and there are no conflicts. The iOS results come from the PR body. Not blocking, and fine to take or leave: the read path rebuilds the |
Summary
A read-only
find, a settled diff or a replay divergence that prints a ref activates a partial ref frame over its own capture. A plain@reffrom the earliersnapshot -iwas then resolved by number against that newer tree. Soget text @eNcould silently read a different element, the #1076 class of bug.getandwaitnow refuse a ref outside the current partial frame's issuance set. They use the existingref_not_issuedreason, and the hint names the partial publication instead of a UI change, as ADR 0014 requires for reads without retained evidence. Refs the partial result printed still resolve. 8 files.This fixes the wrong-node part of #4686. Keeping earlier refs resolvable after a read-only find needs an ADR 0014 decision, which is left to the maintainers on the issue. The options are to stop publishing the
get textref, or to retain the prior complete frame for reads.Refs #4686
Validation
Head
adf612a2bon baseaa600e980.check:quickpassed.packages/daemonandsrc/commandsvitest: 5,277 tests pass. The new partial-frame test fails on base, where the stale read succeeds on the wrong node, and passes on head.check:affected --run --head adf612a2b: format, lint, typecheck, layering, fallow, build and vitest-related passed.unitfailed only inandroid-sdk-setup-action.test.ts, which fails the same way on base on this host because of a local SDK path. docs-links and docs-prose passed when run directly.snapshot -i:find 'label="Speakers (4)"' get textthenget text @e51: base returns "Dictate" (wrong node), head returnsref_not_issued.get text @e2: base returns "Speakers (4)", head returnsref_not_issued.@e1still reads "Speakers (4)".getandwait, such assnapshot -s @ref, are not covered.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.