This repository was archived by the owner on Oct 16, 2026. It is now read-only.
Repository navigation
Fix/runtime - #188
Merged
Merged
Fix/runtime#188
Conversation
- audit the real $prompt path and find the runtime could execute a bounded run and then be unable to say what it had done: loop.transition recorded the action and a reason string, so a decision the matrix reached on its own and one an authority rewrote rendered identically, and the questions an operator must answer after the process exits — was this authorized, what spec was frozen, why another step, why PROVEN — had no event at all - publish the missing control plane in internal/events: execution.authorized, execution.spec.frozen, continuation.evaluated, continuation.selected, objective.evaluated, execution.summary and execution.behavior.observed, each emitted at exactly one real runtime transition, carrying scalars and enums only with no prompt text, model output or artifact bytes, because a forensic record carrying the content it explains could not be trusted as independent evidence - separate proposed from selected: the proposal is published at the last point where the matrix's own action and reason are still intact, and the application is settled from the loop's transition history rather than the call site that stepped it, so a park that bypasses Driver.step is still reported; publishing only the winner would make an authority rewrite indistinguishable from the matrix having chosen that action itself. An authority that ran, inspected and agreed is recorded as nothing, because naming it would claim a contribution the runtime never made - publish a refusal exactly as explicitly as a grant, including at the disambiguation park that happens before the admission gate is ever reached, because an absent authorization event and an authorization that was never attempted are indistinguishable after the process exits - fix R1: the $prompt/$hot directive never reached the Driver, so scopeProvenance read read_only and the behavioral completion gate derived a capability vector carrying no Execute and no Network. A gate that may not start a process can never observe the workspace it is being asked to prove, so every fix/verify/renders objective was downgraded to BEHAVIORALLY UNPROVEN on evidence the gate was never able to gather. The UI now pushes the directive per input through SetScope, because it is bound per input rather than at composition time, and the Driver copies it onto every LoopRequest - fix R2: Skip(StageVerification) published nothing and the executor routed both "no contract exists" and "never reached" through that one call, so a correctly reported plain-text edit was indistinguishable from an unverified mutation. Split into NotApplicableVerification (the gate was consulted), Skip (the boundary was never crossed) and BeginVerification, which is its own event type because entry and completion are different facts and reusing execution.verification.completed for entry would place a verification record ahead of mutation.completed - fix R3: ProviderExecutionPayload recorded neither the requested budget nor the effective ceiling, so a finish_reason=length was unattributable. Record both, with effective observed from the provider-reported completion count at truncation rather than assumed, which is the only way a provider that silently caps a call becomes visible at all - fix R5: the forensic recorder raced its own bus subscription and dropped the verdict tail, so WaitFor and WaitQuiet drain the queue before a trace is reconstructed - fix R6: COMPLETION_WITHOUT_EVIDENCE compared against "proven" while the canonical value is PROVEN, so the detector could never fire - fix R7: UNVERIFIED_MUTATION fired on the absence of any verification record, an accusation manufactured from missing evidence. It now fires only on a positively observed hole — the gate entered and never concluded — and absence yields the UNKNOWN the trace states, because a reader that cries wolf is worse than no reader - mark the seven forensic records as control events so guaranteed delivery applies: they are a handful per run and they are the only record of why the runtime acted, so losing one to telemetry back-pressure would leave the run unexplainable - derive Executed from the behavioral pass's own evidence records and never from the grant, excluding refused capabilities, because the grant says what the pass was ALLOWED to do and listing runtime.serve as executed for a pass refused at the authorization boundary would make a permission readable as an observation - pin the four verification constructors to the graph in the architecture invariants, so the conflation cannot return, and record a run summary on every return path rather than the happy path alone, since a summary that only appears on success is absent exactly when something went wrong - fix a pre-existing build break present since f40f369 that took the whole internal/execution test binary down: execution_test.go imports internal/context as `context`, shadowing the stdlib package, so alias the stdlib import explicitly and drop the stale trailing commas left by an earlier RunAll signature change - prove R1 end to end against a real local model (ollama / qwen2.5-coder:7b) over the real production composition in an isolated git workspace: scope $prompt, seven capabilities granted, three actually executed, behavioural PROVEN on a real HTTP 200, objective PROVEN granted, index.html changed from goodbye to hello on disk, final state completed, no forensic patterns. The control arm is what makes it a proof: the identical run with the directive withheld derives a read-only grant, executes only workspace.discover, is refused AUTHORIZATION_BLOCKED at runtime.serve, never reports PROVEN and ends awaiting_human - add 29 test functions across 7 files: the deterministic forensics suite, the R1 regression and its control arm, the six verification states and the no-cry-wolf rule, the executor's routing seam, post-mortem reconstruction from the real durable audit log, and an opt-in live experiment that needs a local model and stays out of `go test ./...` - add docs/report/EXECUTION_FORENSICS.md and EXECUTION_FORENSICS_STATE.md recording all seven defects, what is proven by measurement rather than by reading code, what must not be touched, and the next exact experiment - keep go build ./..., go vet ./... and gofmt clean, golangci-lint run at 0 issues and go test ./... green across 207 packages
- IsCasualChat matched a greeting word inside a repair instruction (fix it to "Hello"), routing a mutating objective to the zero-context direct_response path - Add Rule 2b: an explicit workspace action (fix, repair, verify, inspect, ...) is always a coding task, matched whole-word so address never matches add - Classified CAPABILITY_SELECTION_FAILURE: the frozen spec showed intent=MUTATE carried by a read-only strategy - Pin regressions in gateway, strategy selection and a model-free autonomy boundary test - Record the R2 targetless-repair benchmark as BLOCKED at discovery→inspection; discovery candidates are evidence, not authority (I13) - Add the opt-in live R2 experiment and update the execution forensics report and state
- Add ScopeProposed state and Derivation.Candidates as non-authoritative evidence, separating DISCOVERED/PROPOSED/AUTHORIZED - Record proposal in ExecutionAuthorized/SpecFrozen payloads and forensic trace with candidates/proposed_targets - Route sole/no-kind candidate to PROPOSED via admission gate, keeping DISAMBIGUATE as authoritative outcome - Prove R3 A/B/C with deterministic and live acceptance tests and close R3 as PROVEN without new authority
- R4 PROVEN: length is invocation outcome, same-execution continue - Executor bounded-step preserves prefix, advances same contract - Driver recovery FULL_REWRITE to BOUNDED_PATCH on OUTPUT_EXHAUSTED - Live qwen2.5-coder 1024-token length then converges PROVEN - Completion evidence-gated, single mutation, no false complete - Add live benchmark, deterministic tests, R4 forensics report
- Add progress and transition fields to continuation decision payload - Implement progress snapshot capture and emit in forensics - Add per-run progress reset in driver - Add trace rendering for progress transitions - Add comprehensive tests for R5 non-progress scenarios - Add R5 non-progress report documentation
- add authoritativeProgressFingerprint and delta check in objective lifecycle router - emit progress_delta on continuation evaluated/selected forensics events - expose failure-ledger evidence epoch for fingerprint comparison - add R5.1 progress-delta regression tests and close R5 reports - remove unused spec helper from R3 target proposal test
- prove cancellation as runtime-owned boundary with two linearization points - fix mutation-boundary cancel misreported as apply_failed to OutcomeCancelled - pin cancelled execution can never become PROVEN via late callbacks - keep committed mutation surviving cancellation, cancel != rollback - add deterministic executor/driver tests plus live R6 probe and reports
- prove interruption is execution-scoped with single-lane refusal, never queued - add deterministic R6-B isolation tests for driver kernel and UI lanes - pin parked abort terminal and continuation keeps original identity - record no lifecycle defect and no production code changed - add R6 interrupt queue report and update forensics state
- Fix verify runStep to never pass cancelled/unstarted step - Add R6-C crash failure tests for execution/autonomy/durable - Add R6 crash failure report proving UNKNOWN post-crash - Update forensics state marking R6-C proven audit Case B
- dispatch pre-digest cursor before execute/approve mutation seam - record commit marker with post-digest on changed/created - add CommitExecutionWithDigest and read-only InspectCursors - expose ReconcileInterrupted for fresh-runtime recovery - add D1-D7 crash tests and R6-D forensics report
- add R7 closure audit with production path and authority map - verify R1-R6 invariants compose with 254 pass matrix - classify limits as non-blocking with FREEZE decision - record state handoff with no production code change
- replace exec.Command with CommandContext in R6C crash helper - replace exec.Command with CommandContext in R6D commit helper - tie helper lifetime to test context to fix noctx lint
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.
No description provided.