FE-1187: Walkthrough remediation sweep 3 — impact ledger, ask hardening, legacy read retirement#331
Conversation
PR SummaryMedium Risk Overview CI and verification: a new Test GitHub Actions workflow runs Docs and planning: Reviewed by Cursor Bugbot for commit e9d771b. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9f6a59e. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR makes “cancelled” structured exchanges self-describing and easier to interpret (for both humans and the agent), while also adding a CLI “tripwire” probe to detect capture-sweep debt in session JSONL and improving dev-mode /introspect legibility.
Changes:
- Canonicalize cancellation rendering via a shared
CANCELLED_TERMINALstring and update formatters/tests/snapshots accordingly. - Add a sweep-debt tripwire probe (
src/probes/sweep-debt-tripwire.ts) with strict CLI argument parsing and comprehensive Vitest coverage. - Improve Pi dev-mode introspection output (top-level field summaries + actionable mirror pointer) and add standalone ask cancellation status guidance in the Pi exchange extension.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/probes/sweep-debt-tripwire.ts | New CLI/library probe to assess sweep debt from session JSONL. |
| src/probes/tests/sweep-debt-tripwire.test.ts | Tests for sweep-debt assessment, JSONL parsing diagnostics, and CLI exit behavior. |
| src/probes/tests/structured-exchange-ordering-proof.test.ts | Updates ordering proof to include the new ui:setStatus event. |
| src/agents/contexts/exchanges/request-response/review.ts | Uses canonical cancellation terminal for request-review rendering. |
| src/agents/contexts/exchanges/request-response/choices.ts | Uses canonical cancellation terminal for request-choices rendering. |
| src/agents/contexts/exchanges/request-response/choice.ts | Uses canonical cancellation terminal for request-choice rendering. |
| src/agents/contexts/exchanges/request-response/answer.ts | Uses canonical cancellation terminal for request-answer rendering. |
| src/agents/contexts/exchanges/option-echo.ts | Introduces CANCELLED_TERMINAL shared cancellation terminal text. |
| src/agents/contexts/exchanges/ask.ts | Renders ask cancellation via CANCELLED_TERMINAL and elides cancelled.message. |
| src/agents/contexts/exchanges/tests/request-response.test.ts | Asserts all request-response cancellations render as the canonical terminal. |
| src/agents/contexts/exchanges/tests/ask.test.ts | Asserts ask cancellation uses canonical terminal (and not trailing italic). |
| src/agents/contexts/exchanges/snapshots/review-set-tuples.md | Snapshot updates reflecting canonical cancellation terminal text. |
| src/agents/contexts/exchanges/snapshots/question-tuples.md | Snapshot updates reflecting canonical cancellation terminal text. |
| src/agents/contexts/exchanges/snapshots/digest-tuples.md | Snapshot updates reflecting canonical cancellation terminal text. |
| src/agents/contexts/exchanges/snapshots/ask-tuples.md | Snapshot updates reflecting canonical cancellation terminal text. |
| src/.pi/extensions/exchanges/TOPOLOGY.md | Documents revised standalone cancellation guidance and lifecycle. |
| src/.pi/extensions/exchanges/ask.ts | Sets/clears a brunch.ask status hint on standalone cancellation/answer. |
| src/.pi/extensions/dev-mode/introspection/TOPOLOGY.md | Documents more actionable /introspect output (field-level + mirror pointer). |
| src/.pi/extensions/dev-mode/introspection/index.ts | Implements top-level summarization + conditional mirror pointer output. |
| src/.pi/extensions/tests/exchanges-present-request.test.ts | Verifies standalone cancellation sets status hint and clears on next answer. |
| src/.pi/extensions/tests/dev-mode-introspection.test.ts | Tests new /introspect output shape and mirror pointer gating. |
| memory/PLAN.md | Updates progress tracking and execution pointer for FE-1187 remediation tranche. |
| memory/cards/walkthrough-remediation-2--consolidated-outer-checkpoint.md | Adds a human-gated consolidated checkpoint card for outer verification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e72e030 to
e6730fc
Compare
9f6a59e to
06cb306
Compare
06cb306 to
9b78289
Compare
43e51fe to
f6c38ac
Compare
9b78289 to
c5c1508
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 85 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/exchanges/schemas/shared.ts:84
zAskContinuationParams.optionsis now optional, but the schema still allows option-dependent flags (multiple,allowOther,allowNone,commentPrompt,topLabel,bottomLabel) to be set whenoptionsis absent. That makes invalid continuation declarations schema-valid and defers the failure to runtime collection/rendering.
…ve ID collision Two decisions allocated D127-L in parallel: FE-1195's bounded parallel slice authority (landed on next first) and FE-1187's review/agent-facing graph semantic grouping (this branch). Following the D111-L/D112-L and D123-L/D126-L reassignment precedent, the later arrival becomes D131-L; the FE-1195 decision keeps D127-L. Updated all impact-ledger citations: the SPEC.md row, lexicon and verification-design references, PLAN.md frontier definitions and KA sketch, graph topology, and ONTOLOGY_REVIEW_PROTOCOL.md. A note on the D131-L row records the reassignment; no content change to either decision. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Lu Nelson <ln@hash.ai>
Signed-off-by: Lu Nelson <ln@hash.ai>
ada7e30 to
3df1a4a
Compare
Merge activity
|
3df1a4a to
006e03b
Compare
| /** Whether cwd contains gitignore-visible product files beyond Brunch and inventory control state. */ | ||
| export async function hasVisibleProductFiles(cwd: string): Promise<boolean> { | ||
| const resolvedCwd = resolve(cwd); | ||
| const shouldIgnore = await createGitignoreMatcher(resolvedCwd); | ||
| return (await countVisibleProductFiles(resolvedCwd, shouldIgnore)) > 0; | ||
| } | ||
|
|
||
| async function countVisibleProductFiles( | ||
| cwd: string, | ||
| shouldIgnore: (relativePath: string, isDirectory: boolean) => boolean, | ||
| ): Promise<number> { | ||
| const entries = await readdir(cwd, { withFileTypes: true }); | ||
| let fileCount = 0; | ||
|
|
||
| for (const entry of entries) { | ||
| if (entry.name === BRUNCH_DIR || entry.name === '.git' || entry.name === '.gitignore') continue; | ||
| const path = join(cwd, entry.name); | ||
| const relativePath = toRelativePath(cwd, path); | ||
| if (shouldIgnore(relativePath, entry.isDirectory())) continue; | ||
| fileCount += entry.isDirectory() ? await countVisibleFiles(path, cwd, shouldIgnore) : 1; | ||
| } | ||
|
|
||
| return fileCount; | ||
| } |
| "release-it": "^20.2.0", | ||
| "remark-cli": "^12.0.1", | ||
| "remark-validate-links": "^13.1.0", | ||
| "table": "^6.9.0", |
The unknown-run load-error test intentionally routes an error through the route error boundary, which React logs to console.error. Scope a console.error spy to that one test and assert the expected boundary log so the suppression stays honest rather than muting all errors. Co-authored-by: Cursor <cursoragent@cursor.com>
| "test": "vitest --run --maxWorkers=4 --exclude='**/*.slow.test.ts'", | ||
| "test:full": "vitest --run --maxWorkers=4", | ||
| "test:slow": "vitest --run --maxWorkers=4 .slow.test.ts", |
| export function projectDigestConfirmation(input: { | ||
| readonly exchangeId: string; | ||
| readonly acceptsDigest: string; | ||
| readonly acceptedAbstract: string; | ||
| readonly question: AskQuestionEcho & { readonly options: NonNullable<AskQuestionEcho['options']> }; | ||
| readonly choice: SelectedChoice; | ||
| }): AskDigestConfirmationDetails { | ||
| return { |


Stack context
Third FE-1187 walkthrough-remediation sweep, stacked on FE-1196's Group 2 platform debt (#327). Its center of gravity is the ingest review-set Impact Ledger renderer plus ask/exchange hardening, and it retires the legacy question read paths deferred from #327.
What changed
src/.pi/components/exchange-review-set-result.ts), backed by a differential oracle across result variants, a content-variant preview gallery, witnessed fixtures, and a wrap-tolerant render-honesty helper.src/session/review-set-settlement.tswith a settlement-convergence proof, slimsrpc/methods/session.ts, and preserves graph diagnostics through settlement.exchanges/schemas/questionnaire.ts; live asks now requireAbortSignals; duplicate headless multi-select answers rejected; persisted questionnaire completion validated.cwd-inventory.ts).src/probes/sweep-debt-tripwire.ts) judging the latest closed sweep interval with strict option parsing and pinned malformed-JSONL diagnostics;/introspectoutput made deterministic and array-safe; physical JSONL source lines preserved in transcript handling.structured-exchange-loop/pending-exchangetrimmed — the deferred leaf-5 retirement from FE-1196: Group 2 platform debt — spec posture, DB identity, headless asks, reconciliation derivation #327); over-broad public-RPC candidate proof assertions (~158 lines); proposal-audit identifier.docs/design/WEB_UI_ARCHITECTURE.md(part I, design-only) added; interactive-tui-driver frontier added to PLAN.Verification
verify:fullequivalent: full suite incl. slow tests + check + build) pending at time of writing; Graphite mergeability, Bugbot, dependency review, and title checks green.🤖 Generated with Claude Code