Skip to content

vscode: calmer prove flow, compile errors in Problems, replay notices - #522

Merged
0xGeorgii merged 9 commits into
mainfrom
feat/vscode-prover-ux-flow
Oct 10, 2026
Merged

0xGeorgii merged 9 commits into
mainfrom
feat/vscode-prover-ux-flow

Conversation

@0xGeorgii

@0xGeorgii 0xGeorgii commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on the Proof Jobs view and status bar PR; this is PR 3 of 3. Review this diff alone.

Why

From the #519 test:

  • A first prove could show up to three modal dialogs, one of them on top of a progress notification, and the unchecked-compiler question came back on every prove.
  • Compile errors went only to the Output channel.
  • clamp.inf with fn clamp was uploaded and failed on the server.
  • Re-proving an unchanged file silently opened a two-day-old portal job.
  • The toolchain-switch toast read "switching to to".

Change

  • Fewer interruptions.
    • Prove This File and Submit save the file instead of asking.
    • The progress notification closes before a question and reopens afterwards.
    • The upload notice comes after a successful compile and the local checks, so a doomed upload never asks.
    • "This proof server doesn't say which compiler it accepts" is asked once per server.
  • Problems panel. Compile errors from infs build are added to Problems with the source infc (proof build). This covers parse errors, multi-error Type checking failed: …; … lines, analysis codes and submodule files; the formats were checked against the accepted compiler d71a9c3e. A toast summarises the errors and offers Show Problems, and the entries clear when you edit the file.
  • Duplicate names. A generated file that defines a name twice is blocked locally. The message explains that the module is named after the file and points at the function to rename.
  • Replays. When the server answers with an existing job, a notice says so: "already being proved", or "already proved 2d ago — " with Run Again. It uses the Idempotent-Replayed header from Inferara/inference-ai-prover#270 when present; otherwise it falls back to the job's status and age, which works on the deployed server today.
  • Compiler mismatch. The dialog offers Install X and Prove, which proves again after the switch; a non-release compiler gets Copy Commit instead. performVersionChange now reports whether it succeeded and says "Inference toolchain vX is now the default.", which also fixes the message for Select Version and Update.
  • Wording. Consistent terms throughout: proof server, API key, Run Again, Cancel Job.
    • Clear API Key now asks for confirmation.
    • "Save Anyway" for an unverified key is now a modal.
    • The Cancel dialog explains the wait of up to about 90 seconds while a worker starts.
  • Docs. The README covers the Proving flow, commands, sidebar, status bar and privacy timing. QA_GUIDE §3, §3a and §14 have new cases for replay, diagnostics, duplicate names, reload restore, themes and finish notices.

Verification

In node:24: typecheck; npm test (502 pass); grammar tests (93 pass); npm run package, with the same 11 .vsix entries.

New tests:

  • the diagnostics parser, using real compiler output;
  • duplicateDefinitions and the preflight block;
  • classifyReplay;
  • the Idempotent-Replayed header, read from a local HTTP server;
  • prove-flow ordering: the upload is asked only after the build and never for a doomed file.

Risk

Saving before Prove changes existing behaviour; it is documented and matches how a debug run saves. Problems entries can duplicate the language server's, and they clear when the file is edited.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no new blocking issue was found.

Reviews (12) · Last reviewed commit: "vscode: place compile errors on the righ..." · Reviewed by Greptile

Comment thread editors/vscode/src/prover/proveFile.ts Outdated
Comment thread editors/vscode/src/prover/submission.ts Outdated
Comment thread editors/vscode/src/prover/infcDiagnostics.ts Outdated
Comment thread editors/vscode/src/prover/proveFile.ts Outdated
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-sidebar branch from 5a22b89 to e356baa Compare October 10, 2026 01:40
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from 2b433f7 to 7d8f37f Compare October 10, 2026 01:40
Comment thread editors/vscode/src/prover/proveFile.ts Outdated
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-sidebar branch from e356baa to f2d987f Compare October 10, 2026 02:15
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from 7d8f37f to c760e77 Compare October 10, 2026 02:15
Comment thread editors/vscode/src/prover/infcDiagnostics.ts Outdated
@0xGeorgii 0xGeorgii self-assigned this Oct 10, 2026
@0xGeorgii 0xGeorgii added the vscode VSCode extension label Oct 10, 2026
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from c760e77 to 9683819 Compare October 10, 2026 11:55
Comment thread editors/vscode/src/prover/proveFile.ts Outdated
Comment thread editors/vscode/src/prover/submitProof.ts Outdated
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-sidebar branch from 4178e87 to 7ceb0c9 Compare October 10, 2026 12:36
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from 932b31e to 3737336 Compare October 10, 2026 12:36
Comment thread editors/vscode/src/prover/infcDiagnostics.ts Outdated
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from 3737336 to cae4513 Compare October 10, 2026 12:53
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-sidebar branch from 1906811 to f79a65c Compare October 10, 2026 12:56
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from cae4513 to 93c3deb Compare October 10, 2026 12:56
Comment thread editors/vscode/src/prover/infcDiagnostics.ts
Comment thread editors/vscode/src/prover/submitProof.ts
0xGeorgii and others added 6 commits October 10, 2026 22:10
Prove This File / Submit Rocq File:
- Saves the file instead of asking; no dialog ever sits on top of a
  progress notification (the notification closes for a question and
  reopens after it).
- The upload notice comes after a successful compile and the local file
  checks, so a doomed upload never asks. "This proof server doesn't say
  which compiler it accepts" is asked once per server.
- Compile errors from infs build go to the Problems panel (parse errors,
  "Type checking failed: …; …", analysis codes, submodule files), with a
  summary toast and Show Problems.
- A generated file that defines a name twice is not uploaded: the
  compiler names the module after the file, so clamp.inf with fn clamp
  cannot compile on the server. The message explains it and points at
  the function.
- When the server answers with an existing job for the same file, say so
  ("already being proved", or "already proved 2d ago — <result>" with Run
  Again). Uses the server's Idempotent-Replayed header when present, else
  the job's status and age.
- A compiler mismatch offers "Install X and Prove", which proves again
  after switching; a non-release compiler offers Copy Commit.
- performVersionChange reports success and says "Inference toolchain vX
  is now the default." (it read "switching to to").

Wording: one name per thing (proof server, API key, Run Again, Cancel
Job). Clear API Key asks first; "Save Anyway" for an unchecked key is a
modal. Cancel explains the up-to-90-second wait while a worker starts.

README and QA_GUIDE describe the new panel, view, status bar, Problems
integration and replay behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "Install … and Prove" proves again once the running-build guard is
  released (it was refused as "already running").
- The duplicate-definition check ignores comments and strings, keeps
  Module namespaces apart, and blocks only files the compiler just
  generated; a hand-written .v is left to the server, whose error the job
  panel shows.
- Parse errors in an imported file go to that file in Problems (infc
  names it only in the "failed to parse imported file `a::b`" header).
- Each build replaces everything its previous build of the same entry
  published, including imported files, and does not publish errors for a
  file edited while it ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
infc prints some type errors over two lines (a `note:` line), and joins
the next error onto the note line after `; `. The parser read only the
`Type checking failed:` line, so every later error went missing from
Problems and the count. It now reads the note lines into the message
before splitting, and keeps the note of analysis findings too.

A replay notice's Run Again is ignored after the server or account
changed, as the finish notices already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t was sent with

- Problems keep the latest errors of each entry's build per file, so a
  rebuild replaces only its own entry's errors. Before, rebuilding one
  entry that stopped importing a broken file also cleared the errors
  another entry's build had reported there (BuildProblems, tested).
- Prove This File and Submit capture the account check when they start.
  If the server or API key changes during the build or upload, the job is
  not opened against the new server, and its replay notice cannot Run
  Again there; a notice says where the job went.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parser matched `warning[…]` findings but dropped the severity, so
Problems showed them as errors and the notification counted them as
compile errors. They now keep warning severity, and the notification
counts errors and warnings apart ("1 compile error and 1 warning").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from d54efb1 to 70113d8 Compare October 10, 2026 13:11
0xGeorgii added a commit that referenced this pull request Oct 10, 2026
#521 landed on main by rebase (4265f8f), so this branch's code is all in
main under different commits. Joining them lets #522, stacked on this
branch, diff against main's history.
infc prints a missing import, an unreadable file and the like as a
one-line `Parse error:` with no positioned errors under it. The parser
skipped those, so Problems stayed empty; they are now kept as errors on
the entry file's first line, with any detail lines.

Also say what an idempotent replay returns: the existing job as it is now
(the server builds the 202 body from the current row), not the original
response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from 70113d8 to f6b7c2b Compare October 10, 2026 13:12
@0xGeorgii
0xGeorgii removed this pull request from stack #524 October 10, 2026 13:14
Comment thread editors/vscode/src/prover/proveFile.ts Outdated
@0xGeorgii
0xGeorgii changed the base branch from feat/vscode-prover-ux-sidebar to main October 10, 2026 13:57
The search for `fn <name>` in the .inf ran on raw lines, so a comment or
string mentioning it earlier in the file got the Problems entry and the
"Go to fn" link. It now searches the text with comments and string
contents blanked out the way the compiler's lexer reads them (`//` and
`///` to end of line, single-line strings), keeping positions
(infSource.ts, tested). A qualified duplicate name is matched by its last
segment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGeorgii
0xGeorgii force-pushed the feat/vscode-prover-ux-flow branch from e265789 to 128ae86 Compare October 10, 2026 13:58
Comment thread editors/vscode/src/prover/proveFile.ts Outdated
infc counts columns in UTF-8 bytes (the lexer advances the column per
byte); VS Code positions count UTF-16 units. After an `é` or other
non-ASCII text on the same line, Problems highlighted a later character.
Publishing now reads each affected file's line as the build saw it and
converts the column (characterAt, tested); it keeps the raw column when
the file cannot be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGeorgii
0xGeorgii merged commit bf62f22 into main Oct 10, 2026
15 checks passed
@0xGeorgii
0xGeorgii deleted the feat/vscode-prover-ux-flow branch October 10, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscode VSCode extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant