Repository navigation
test(vscode): stamp the preview gap smoke ledger after the save (#4902) - #4903
Conversation
#4709 made ripr lsp withhold a gap ledger whose source_subject is missing or stale. The smoke wrote an unstamped ledger and then edited pricing.ts, so the preview diagnostic never appeared. Write the ledger after the save, stamped with the digests of the files its record names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- editors/vscode/test/suite/extension.test.ts:5227 — EDITOR_GAP_SMOKE_SUBJECT_FILES is a hardcoded pair; derive it from the ledger record's named subjects (e.g. extract from editorGapSmokeLedger()) so future ledger edits do not silently break the stamp and produce a flaky smoke.
Verification questions
- Confirm stamp set is hardcoded to two files; if editorGapSmokeLedger() names additional subjects the validator will reject the fixture again (silent coverage gap).
- Confirm subject file list is hand-coded to src/pricing.ts and tests/pricing.test.ts; mismatch with #4544 schema would silently mis-stamp.
- Confirm test-only diff lacks an in-repo automated proof that the stamp matches what the #4544 validator accepts; the only positive signal is the hosted vscode lane. A focused test that asserts source_subject.digest_algorithm==='sha256' and recomputes the digests against the on-disk files would close the loop without requiring the e2e harness.
Refuted
- Stamping src/pricing.ts and tests/pricing.test.ts is insufficient: the ledger record may name additional files that are not stamped, so server would still withhold; refuted because: #4544 contract (per PR body) requires every file named by the record to be stamped; EDITOR_GAP_SMOKE_SUBJECT_FILES must mirror exactly the file set editorGapSmokeLedger() references. Editor gap ledger contents are unchanged and previously passed the non-source-subject portion of the contract; stamp scope matches producer contract.
- Ledger is stamped with pre-save content, so server still rejects; refuted because: Diff places the writeEditorGapSmokeLedger call after editAndSaveDocumentThenWaitForAnalysis returns; fs.readFile inside the function reads the now-saved src/pricing.ts. Pre-save digest objection fails.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- VS Code e2e is local-unrunnable per PR body; only hosted CI lane proves red→green.
- PR admits local e2e cannot run; hosted vscode lane is the only positive proof. No cargo-test/xtask receipt is in the base packet yet (scheduled-late).
…#4902 review) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
|
Two follow-ups. The ub-review finding (hardcoded subject list) is fixed in 01abae4. The stamp now derives its file set from the ledger records, the same keys the #4544 validator requires: The vscode lane was skipped on the first head. The Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review of 01abae4 (REVIEW_READY).
Inspected:
- Full diff (one file,
editors/vscode/test/suite/extension.test.ts, +34/-2). There is no production change. - The ledger is now written after
editAndSaveDocumentThenWaitForAnalysis, so the digests describe the saved bytes. Before this change it was written before the edit, which made the stamp stale by construction. gapLedgerSubjectPathsderives its paths from the same fields the LSP validator requires (anchor.file,repair_route.target_file, andrepair_route.related_testbefore::). It deduplicates and sorts them, which matches the sorted-by-path contract inoutput/gap_source_subject/shared.rs. This addresses the ub-review finding: the stamp can no longer drift from the record.- The digest format
sha256:<hex>anddigest_algorithm: "sha256"matchSOURCE_SUBJECT_DIGEST_ALGORITHMandGapSourceSubjectFile.
Proof:
- The hosted
vscodee2e passed on this head (run 36548731010, job 109344254293). - Main is red on the same test (run 36543366218), which is the negative case.
- Local e2e was not run, because VS Code cannot be downloaded in this container.
Reviews:
- Devin: no issues.
- Codex: no comments.
- ub-review: its finding is fixed.
- CodeRabbit: rate-limited. Recorded as review missing, not clean.
Generated by Claude Code
Summary
real server surfaces preview gap diagnostic, hover, status, and bounded actionstimes out waiting for the TypeScript preview diagnostic (run 36543366218, job 109324664093).src/pricing.ts, stamped withsource_subjectdigests of every file the record names, soripr lspaccepts it as current.#4709 (#4544) made the server withhold an unstamped or stale ledger. The smoke's hand-built ledger had no stamp and was written before the edit, so the server rejected it, which is correct behavior. This changes only the test.
Fixes #4902.
Swarm / Source Boundary
Source-of-truth Links
Governing issue or accepted claim: #4902 (follow-up to #4544 / #4709)
Acceptance delta (one sentence): the VS Code preview gap smoke passes against a server that validates
source_subject.Candidate Relationships
Candidate branch:
claude/project-thread-2rk3d2-vscode-smokeStack parent or prerequisite PR: none
Scope Classification
Production delta: none.
Evidence/support delta: the smoke fixture ledger carries the stamp a real producer writes (
sha256, filessrc/pricing.ts,tests/pricing.test.ts), computed after the save.Non-goals: no change to the #4544 validator or to how producers stamp.
Support-tier Impact
Policy Impact
Proof
Local e2e could not run: this container cannot reach update.code.visualstudio.com to download VS Code. The hosted vscode lane on this PR is the positive proof; main's red run is the negative one.
Claim Boundary
Claims only that the smoke fixture matches the #4544 contract. Nothing about server behavior changes.
Rollback
Revert the commit; the smoke goes red again against current main.
CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin tests.Extension changes:
cd editors/vscode && npm citsc -p ./)🤖 Generated with Claude Code
https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
Generated by Claude Code