goal: expand an objective into an append-only ledger before building#422
Closed
damienrch wants to merge 2 commits into
Closed
goal: expand an objective into an append-only ledger before building#422damienrch wants to merge 2 commits into
damienrch wants to merge 2 commits into
Conversation
gofumpt and gofmt disagree about alignment when a map key is a wide rune, and the lint gate follows gofumpt. Whitespace only.
A goal today takes an objective and a stop condition and starts building on step one, so "done" is only ever decided by reading prose. That fails in both directions: a run declares victory having written nothing, and a genuinely finished run goes undetected because its wording drifted. Neither is fixable by parsing harder. Completion has to be a state transition on a durable record. This adds that record and the phase that writes it. Spec.Ledger is the objective expanded into the units of work it implies, each item carrying its own declared way to verify it, recorded when the work is planned rather than argued for once it is time to claim the item is done. Status.Ledger is the per-item observation of it, and every item starts unproven, so a run begins from a record saying nothing is done yet. Two structural rules protect the record from the agent writing it: Append-and-mark-only. An item may be added and its state may be marked, but no item is ever removed or rewritten. This forecloses the failure where an agent under completion pressure edits the definition of done: dropping an item, narrowing a verify clause until the check it promised is no longer the check it faces. A prompt asking the model not to do that is advisory and gets ignored under pressure. A ledger whose prefix cannot change is not. The rule is enforced twice, at the write and again on reconcile, so a ledger edited around the write path stalls the goal instead of becoming the new definition of done. Content-addressed items. An item's id is a hash of its text and verify clause, assigned on append rather than chosen by the planner, so a rewrite is a different id and the extension check sees it as the removal it is. A rewrite that keeps the old id is caught by the self-addressing check. The planning phase is a Planner port on the worker plus WithPlanning on the reconciler: the first dispatch is a plan job, no build step goes out until the ledger exists, and a planner that produced nothing stalls the goal rather than letting it build against a record that never said what success was. Planning rides the same queue, lease, crash-resume and retry ladder a build step has, and does not spend the build budget, since it is the phase that decides what that budget gets spent on. Both halves are opt-in and paired in one place, because a goal gated on planning with no planner wired would wait forever. Every goal composed before this is unchanged, which the tests pin. Task: ea96cbbc-a957-4bcb-8d3e-01268f8ed1bf
Collaborator
|
Opened under the wrong identity. Reopening from the workspace account. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
F1 of the goal-mode epic: a goal expands its objective into a durable ledger of work items, all of them unproven, before any building starts.
Stacked on
provetrail-freeze-bytes(#421), which this branch was cut from. Review that one first; the diff here is the singleadb0f08commit.Task: ea96cbbc-a957-4bcb-8d3e-01268f8ed1bf
Epic: 06cb1e7e-3955-465d-9c82-bbc36971215d