Skip to content

feat(app,cli): the history rewind is a command every surface can name - #122

Open
aliasfoxkde wants to merge 4 commits into
mainfrom
feat/history-rewind-palette
Open

aliasfoxkde wants to merge 4 commits into
mainfrom
feat/history-rewind-palette

Conversation

@aliasfoxkde

@aliasfoxkde aliasfoxkde commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Decision 0082 made the session-scoped history.rewind runnable but left
its app half open: the id is handled by the session's apply path, outside
the registry, so no surface could enumerate it. A command an agent or a
palette cannot name is a command it cannot use.

What changed

  • The command palette filters on catalog::all_ids(), so the rewind is
    offered beside the registry's ids, and the palette's "N of M" counter
    counts it.
  • The palette's rewind payload is grounded to the live document: a
    palette run is a user's undo — one step below where the document
    sits — not a fuzz depth.
  • Persisted palette recents restore accepts the session-scoped id.
  • firecraft.listCommands extends the registry's names with the
    session-scoped ones, so an agent finds the rewind and can run it
    through firecraft.apply.
  • The fuzz drive's payload template gains the rewind's arm outside its
    call table, so the drive's coverage property (CALLS == catalog::ids())
    stays intact and the reachability measurement does not move.

Verification

  • cargo fmt --all -- --check clean; cargo clippy --workspace --all-targets -- -D warnings clean.
  • cargo test --workspace passes.
  • New tests: palette_runs_the_session_scoped_rewind (in-crate) and
    the_mcp_surface_lists_and_runs_the_rewind
    (crates/app/tests/history_rewind.rs).

Notes

  • Decision record: docs/decisions/0096-the-rewind-is-a-command-every-surface-can-name.md.
  • Task ticket: docs/tasks/T10-history-rewind-command.md.
  • The reachability floor is unchanged at 168/253 (66.40%) — the rewind is
    not a registry id, so it was never in that measurement.

CI: the pipeline watchdog budgets

This branch also carries ci: size the pipeline watchdogs from the fleet's measured wall-clock (18f5de0) — a CI-infrastructure change, not part of the
feature. The pipeline's job timeouts were shorter than a passing job can
take under the runner's load: the release job's worst successful run
finished 1.7 minutes inside its 90-minute budget, and two perf-budgets
runs were killed at 20.2 and 20.3 minutes while still working. This
branch's own receipt could not complete under those budgets.

Each budget is now ~2.5x the worst successful duration measured on the
fleet. No gate is weakened — a budget decides when a container is killed,
not whether a check passes. Measurement and reasoning: issue #126.

🤖 Generated with Claude Code

Decision 0082 made the history rewind runnable but left its app half
open: the id was handled by the session's apply path, outside the
registry, so no surface could enumerate it. A command an agent or a
palette cannot name is a command it cannot use.

Every enumeration site now reads the session-scoped list too. The
command palette filters on `catalog::all_ids()`, so the rewind is
offered beside the registry's ids and the palette's counter counts it.
Its payload is grounded to the live document: a palette run is a user's
undo, one step below where the document sits, not a fuzz depth. The
persisted recents restore accepts it for the same reason.

The MCP bridge's discovery list extends the registry's names with the
session-scoped ones, so `firecraft.listCommands` finds the rewind and
`firecraft.apply` can run it.

The fuzz drive keeps its call table equal to the registry's ids, so the
rewind's payload template sits outside that table: the template exists
for the palette and the drive's coverage property is untouched. The
reachability measurement therefore does not move.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fa424d42-aa65-43a9-a54a-91306b61c67a
Commits

Reviewing files that changed from the base of the PR and between e39705e and dec2e77.

Files selected for processing: 9

  • crates/app-cli/src/mcp.rs
  • crates/app/src/shell/mod.rs
  • crates/app/src/shell/palette.rs
  • crates/app/tests/history_rewind.rs
  • crates/engine/src/fuzzdrive.rs
  • docs/NEXT.md
  • docs/PROGRESS.md
  • docs/decisions/0096-the-rewind-is-a-command-every-surface-can-name.md
  • docs/tasks/T10-history-rewind-command.md
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Michael Kinney and others added 2 commits November 11, 2026 15:47
A job's `timeout:` is a watchdog, not a gate: it kills the container and
records `timed_out` with no diagnostic about what was slow. The budgets
were sized by guess, and the guess is now falsified by the fleet's own
record — a job was killed at 20.2 min and at 20.3 min while still
working, and the release job's worst successful run finished 1.7 minutes
inside its 90-minute budget.

The runner holds 4 concurrent containers on a 16-core host and each
compiles the workspace, so a co-tenant wave inflates a job roughly 4x.
Measured on 2026-11-11 with 9 runs in flight (idle in parentheses):

  job              budget  worst success   idle
  fmt-layers         20m        20.1 min   0.3 min
  clippy-test        90m        76.9 min  10.3 min
  wasm-web           60m        45.6 min   9.0 min
  corpus-golden      30m        19.6 min   2.5 min
  perf-budgets       20m        14.3 min   3.2 min
  fuzz               60m        52.9 min  10.6 min
  generated-docs     20m        16.1 min   2.1 min
  release            90m        88.3 min  38.8 min

Each budget below is ~2.5x the worst successful duration, so a loaded
job still fits and a genuinely hung job is still killed:

  fmt-layers 45m, clippy-test 150m, wasm-web 90m, corpus-golden 45m,
  perf-budgets 45m, fuzz 120m, generated-docs 45m, release 180m

No gate is weakened: the budgets decide when a container is killed, not
whether a check passes.

Refs #126

Co-Authored-By: Claude Code <noreply@anthropic.com>
Both ledgers kept: Phase 20 now lists 20.1, 20.2, 20.3, 20.5 and 20.6 as
landed, and the release lane carries the history-rewind, animation
timeline and Optimize rows side by side.

Co-Authored-By: Claude Code <noreply@anthropic.com>
aliasfoxkde pushed a commit that referenced this pull request Nov 12, 2026
Conflict resolution:
- .gitforge.yml: keep this branch's job split (fmt-only fmt-layers at
  20m, dedicated layers job at 45m with the docs-only skip); main's
  watchdog budget comment applies to the layers job.
- docs/GAPS.md, docs/NEXT.md: main's re-pinned reachability floor
  (253 commands, 168 bound = 66.40%) wins; main's #118 landed-status
  wins for 20.2/20.3, branch notes kept for open #113/#122 and the
  verified 20.6/20.7 landings.
- docs/PROGRESS.md: 19.1-19.6 landed (branch) + #118's Phase 20 bullet
  (main, stale rewind/slice tail corrected - both verified landed
  in-tree) + 66.40% floor and 19 panels (main).
- docs/TASKS.md: Phase 20 row now 20.1-20.3, 20.5-20.7 on main with
  20.4 in PR; Phase 21 Done; web deployment Reconciled; the Phase 20
  open-PRs table reduced to #113.

Gate: cargo run -p xtask -- ci -> EXIT=0, all gates green (changelog
regeneration additive, 399 entries, none dropped).

Co-Authored-By: Claude Code <noreply@anthropic.com>
Main's reconciled task board already carries the history-rewind row and
the 20.6 status, so the board conflict resolves to main's file; the
roadmap keeps the branch's fuller 20.6 entry, which names the ticket
and the decision, and main's 20.7 entry.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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.

1 participant