Skip to content

FE-1141: Add readable run evidence and graph traceability#303

Merged
kostandinang merged 14 commits into
nextfrom
ka/fe-1141-readable-run-evidence
Jul 8, 2026
Merged

FE-1141: Add readable run evidence and graph traceability#303
kostandinang merged 14 commits into
nextfrom
ka/fe-1141-readable-run-evidence

Conversation

@kostandinang

@kostandinang kostandinang commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Stack Context

Stacked on PR #302 (FE-1166: Add executor run environment policy). This PR makes executor runs easier to inspect and adds the first guarded replanning affordance on top of that evidence.

/

image.png

/runs

image.png

/run/<run_id>

image.png

What?

Observer / evidence readability

  • Add readable worker/verify evidence panels with deduped worker deltas, ANSI-stripped verify output, failure-first summaries, and raw-log disclosure.
  • Group lifecycle events by slice progression.
  • Add execute.runTraceIndex for graph-node-to-run/slice traceability.
  • Link run requirement rows back to the spec graph and slice-log anchors.
  • Show run badges on executable graph nodes, degrading safely if run traces are unavailable.

Replanning / recovery

  • Add web-safe replanning RPC methods: execute.replanRecommendation, execute.replanRegeneratePlan, execute.replanStartNewRun, and execute.replanAbandonRun.
  • Add a /runs/$runId replanning panel with diagnosis, allowed actions, web-callable action buttons, and disabled copy for executor-runtime-only retry.
  • Add conservative auto-replan policy core: retry fresh runs when budget remains, regenerate stale early plans, and never auto-supersede stale started runs.

execute.replanRetryCurrentStep is intentionally not exposed over web RPC because it needs ExecutionPorts and executor runtime/model context.

Why?

Observability reads evidence; replanning acts on evidence. This PR keeps that split clear: the observer paths stay broad and passive, while replanning remains explicit, guarded, and evidence-preserving.

The run page now helps answer both questions: what happened, and what safe recovery action is available next.

How to run / inspect

  • Open /runs/$runId to inspect readable worker/verify panels, grouped slice events, raw-log disclosures, and the replanning panel.
  • Open /spec/$specId to see REQ* / AC* graph nodes annotated with run badges that link back to the relevant run.
  • For direct RPC checks, call execute.runTraceIndex and execute.replanRecommendation.

kostandinang commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@kostandinang kostandinang marked this pull request as ready for review July 7, 2026 21:02
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New write RPC paths mutate run/plan state (regenerate, supersede, abandon) with eligibility guards; observer presentation changes could hide nuance if compaction rules are wrong, though raw logs remain available.

Overview
Improves executor run observability and spec↔run traceability, and exposes guarded replanning over RPC (without wiring a replanning panel in the web diff shown).

Run detail & projections: observer-read adds sliceProgress from report events (and avoids treating non-terminal verify statuses as passed). execute.run and run detail UI normalize older payloads missing evidence arrays. Worker/verify panels compact duplicate/prefix stream lines, strip ANSI, surface verify failures first, and keep raw event disclosure. Lifecycle UI groups by slice progression with anchor ids for slice logs.

Graph traceability: New execute.runTraceIndex maps REQ* / AC* node codes to runs/slices (failed vs completed). Spec graph nodes show run badges linking to /runs/$runId; run requirements link view in graph and view slice log (failed slices preferred). Cache invalidation includes execute.runTraceIndex on run updates.

Replanning (RPC + core): Web-callable execute.replanRecommendation, execute.replanRegeneratePlan, execute.replanStartNewRun, and execute.replanAbandonRun (spec/run ownership checks, product updates on writes). execute.replanRetryCurrentStep is intentionally absent from public RPC. Executor adds run-auto-replan-policy for conservative automation (retry with budget, regenerate stale early plans; no auto-supersede).

Workspace home: Loads run list, shows run counts/previews and active-spec progress hints from graph overview.

Docs / planning: Updates D111-L / I58-L for FE-1166 empty_dir run-local git init exception; new follow-up scope card for actionable slice requests; supersedes narrow replanning web-metadata card in favor of readable-evidence work.

Tests: Host-promotion port tests use repo-local scratch dirs with finally cleanup.

Reviewed by Cursor Bugbot for commit 0486ec8. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/web/routes/runs.tsx Outdated
Comment thread src/web/routes/runs.tsx Outdated
Comment thread src/web/routes/runs.tsx Outdated
@kostandinang kostandinang requested a review from lunelson July 8, 2026 07:42
@kostandinang kostandinang marked this pull request as draft July 8, 2026 08:14
@kostandinang kostandinang marked this pull request as ready for review July 8, 2026 08:16
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 5781120 to 4da2942 Compare July 8, 2026 08:22
@kostandinang kostandinang force-pushed the ka/fe-1166-greenfield-executor-harness branch from e10205f to 86756d7 Compare July 8, 2026 08:22
@kostandinang kostandinang marked this pull request as draft July 8, 2026 08:22
Comment thread src/web/routes/runs.tsx Outdated
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 4da2942 to f4dbc18 Compare July 8, 2026 08:27
@kostandinang kostandinang force-pushed the ka/fe-1166-greenfield-executor-harness branch from 1d138bd to f76437d Compare July 8, 2026 09:30
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from f4dbc18 to 11bdf56 Compare July 8, 2026 09:30
@kostandinang kostandinang force-pushed the ka/fe-1166-greenfield-executor-harness branch from f76437d to f87bfcc Compare July 8, 2026 09:47
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 11bdf56 to 057b2d3 Compare July 8, 2026 09:47
@kostandinang kostandinang force-pushed the ka/fe-1166-greenfield-executor-harness branch from f87bfcc to 047123f Compare July 8, 2026 10:05
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 057b2d3 to a7b56dc Compare July 8, 2026 10:05
@kostandinang kostandinang marked this pull request as ready for review July 8, 2026 10:06
Comment thread src/web/routes/root.tsx Outdated
Comment thread src/web/routes/runs.tsx Outdated
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 34e091e to ccb4d73 Compare July 8, 2026 11:15
Comment thread src/rpc/methods/execute.ts
Comment thread src/web/routes/root.tsx Outdated

@lunelson lunelson 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.

The observer/readability pieces look coherent, and the run evidence UI is much easier to follow.

I think the web replanning controls need one product-entry check before merge. The buttons call execute.replanRegeneratePlan, execute.replanStartNewRun, and execute.replanAbandonRun, but the browser client defaults to /rpc, and web-host.ts attaches /rpc with createReadOnlyRpcHandlers, which filters write methods out. /rpc/driver only adds session driver methods, not these execute writes.

So this looks like a case where route/RPC tests can pass through injected handlers while the real web sidecar would return Method not found for the new buttons. Can we either expose these execute write methods on the intended web connection, or keep the web surface read-only and remove/disable the controls until that authority path exists?

@kostandinang

Copy link
Copy Markdown
Contributor Author

Fixed: kept the web run observer read-only by removing replanning controls, web replanning RPC wrappers, and related invalidations. Focused web tests pass.

Comment thread src/web/routes/runs.tsx
Comment thread src/web/routes/runs.tsx
Comment thread src/web/routes/root.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 5 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 928c972. Configure here.

Comment thread src/rpc/methods/execute.ts
Comment thread src/executor/observer-read.ts Outdated
@kostandinang kostandinang requested a review from lunelson July 8, 2026 13:26
@graphite-app graphite-app Bot changed the base branch from ka/fe-1166-greenfield-executor-harness to graphite-base/303 July 8, 2026 13:28
@graphite-app

graphite-app Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merge activity

  • Jul 8, 1:46 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Jul 8, 1:46 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 4ffb084 to 82c49b5 Compare July 8, 2026 14:04
@kostandinang kostandinang force-pushed the ka/fe-1141-readable-run-evidence branch from 82c49b5 to 0486ec8 Compare July 8, 2026 14:15
@kostandinang kostandinang changed the base branch from graphite-base/303 to next July 8, 2026 14:15
@kostandinang kostandinang merged commit faf3458 into next Jul 8, 2026
11 of 12 checks passed
@kostandinang kostandinang deleted the ka/fe-1141-readable-run-evidence branch July 8, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants