Skip to content

test(vscode): stamp the preview gap smoke ledger after the save (#4902) - #4903

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-2rk3d2-vscode-smoke
Sep 29, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-2rk3d2-vscode-smoke

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

  • Before: main's VS Code e2e smoke real server surfaces preview gap diagnostic, hover, status, and bounded actions times out waiting for the TypeScript preview diagnostic (run 36543366218, job 109324664093).
  • After: the smoke writes its gap decision ledger after the save that changes src/pricing.ts, stamped with source_subject digests of every file the record names, so ripr lsp accepts 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-smoke
Stack parent or prerequisite PR: none

Scope Classification

  • Docs/spec/test-only evidence package

Production delta: none.

Evidence/support delta: the smoke fixture ledger carries the stamp a real producer writes (sha256, files src/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

  • none

Policy Impact

  • none

Proof

cd editors/vscode && npm ci && node_modules/.bin/tsc -p ./   # compiles
RIPR_TEST_GREP="real server surfaces preview gap" xvfb-run -a cargo xtask vscode-test

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

  • No new panic, unwrap, expect, todo, or unimplemented in tests.

Extension changes:

  • cd editors/vscode && npm ci
  • compile (tsc -p ./)

🤖 Generated with Claude Code

https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx


Generated by Claude Code

#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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 29, 2026 08:51
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5d8a7070-c653-4efb-b8c4-827c2cc498b9

📥 Commits

Reviewing files that changed from the base of the PR and between 8a224a8 and 01abae4.

📒 Files selected for processing (1)
  • editors/vscode/test/suite/extension.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T08:53:04.183191Z cb23354 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@EffortlessSteven EffortlessSteven added the full-ci Run required, advisory, and release-like CI lanes. label Sep 29, 2026 — with Claude

Copy link
Copy Markdown
Member Author

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: anchor.file, repair_route.target_file, and repair_route.related_test before ::. Editing the fixture ledger can no longer leave the stamp incomplete.

The vscode lane was skipped on the first head. The vscode job in ci.yml runs on pull requests only when the PR has the full-ci label. That is also how #4709 reached main without the lane running. I added full-ci here, so the VS Code e2e runs on this head and gives the positive proof.


Generated by Claude Code

@EffortlessSteven EffortlessSteven added full-ci Run required, advisory, and release-like CI lanes. and removed full-ci Run required, advisory, and release-like CI lanes. labels Sep 29, 2026 — with Claude
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
  • gapLedgerSubjectPaths derives its paths from the same fields the LSP validator requires (anchor.file, repair_route.target_file, and repair_route.related_test before ::). It deduplicates and sorts them, which matches the sorted-by-path contract in output/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> and digest_algorithm: "sha256" match SOURCE_SUBJECT_DIGEST_ALGORITHM and GapSourceSubjectFile.

Proof:

  • The hosted vscode e2e 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

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) September 29, 2026 09:41
@EffortlessSteven
EffortlessSteven merged commit 923973d into main Sep 29, 2026
50 of 61 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-2rk3d2-vscode-smoke branch September 29, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run required, advisory, and release-like CI lanes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code preview gap smoke red on main: its hand-written ledger has no source_subject stamp

2 participants