Repository navigation
refactor(h21): settle run - #24
Merged
Merged
Conversation
… teardown proof for a started run's terminal event (H21.1c)
settle_run replaces finalize_run and complete_run_in_transaction. It pre-reads
outcome_json and writes nothing when the run already carries an outcome, so a
replayed settlement (a compaction settled by its own transaction and again by
the prompt's teardown, or a recovery sweep racing a just-committed settlement)
no longer overwrites the outcome, appends a second RunFinished, or clears an
active_run_id that a newer run now owns. SettlementCause::{Executor, Recovery}
selects the event's caused_by and whether the row's committed usage/cost is
overwritten or preserved. The queued path gains the same null predicate and
complete_run / complete_compaction check the guard before any write.
RunResources::{drain, stop} now return TeardownComplete, a zero-sized proof
type that Store::finish_run and Store::finish_compaction_run require by value,
so publishing a started run's terminal event without draining its tools and
children does not compile. Seven pre-stream exits that settled a started row
without any teardown now stop the unpolled provider stream first.
Regression tests settling_a_settled_run_is_a_no_op_on_every_path and
a_committed_compaction_is_not_resettled_by_the_prompts_teardown fail on the
previous source and pass here.
Slice: speed-first H21.1 (part 3 of 3). ADR-0012.
…e speed-first ledger Writes the reserved ADR-0012 as implemented (one guarded settle_run, TeardownComplete token), marks it Accepted in the ADR index and root.md, adds a settlement paragraph to architecture.md § Persistence, updates the plan's H21 status row, and appends the H21.1c receipt to the ledger.
Add docs/design/harness-catalog-2026-09.md, a per-feature catalog of the Codex, OpenCode V2, Pi, and fx snapshots under .source/ against QQ: tool bounds, output bounding, shell safety and sandboxing, input ergonomics, extensions and sessions, ranked QQ gaps, and differentiators no audited harness ships. Add docs/plans/tool-layer.md (T1-T14): shared Bounds/bound_text/ToolOutput primitives with header convention, secret masking, and a per-turn output budget; search v2 (ignore-aware, regex, definition/references, cursor), read_file v2 (gutter, ranges, outline, if_changed_since), tree, batched edit_file with matching cascade and dry_run, spill store with read_tool_result, tree-sitter shell classifier with a Forbidden decision, exec argv tool and prefer-built-in nudge, fetch, ask_user, view_image, gated terminal, @-mention grammar, and an A0-A5 ablation plan. Wire the plan into docs/README.md, docs/plans/README.md, and the progress ledgers; reserve ADR-0019..0021 and file root requests; point the terminal-bench Phase 6 candidates at the new plan.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.