Skip to content

LOOP Continuity: durable run state (ADR 0002, all phases P0-P4) - #1

Merged
killerdasher merged 24 commits into
mainfrom
continuity
Nov 15, 2026
Merged

killerdasher merged 24 commits into
mainfrom
continuity

Conversation

@killerdasher

Copy link
Copy Markdown
Owner

LOOP Continuity - durable run state across sessions (ADR 0002)

Implements the owner-approved architecture review (2026-11-05, "APPROVED WITH AMENDMENTS") across all phases:

  • P0 - docs/adr/0002-loop-continuity.md decision record with all seven amendments folded in; ADR 0001 addendum distinguishing skill-first architecture from helper-backed persistence.
  • P1 - scripts/continuity.mjs: optional, zero-external-dependency helper (Node >= 16.7). Schema v1 (six run statuses + separate integrity dimension), documented transition table with invalid transitions as hard errors, sanitized remote-URL identity fingerprints, atomic persistence (temp + fsync + rename, recoverable temps, repair only removes provably superseded leftovers), corrupt/unsupported state never silently overwritten, cancel/complete archiving with retained terminal evidence, best-effort secret scanner with documented limits. Identity-enforcement gap found by the real-module tests before any command shipped and fixed.
  • P2 - four thin commands (/loop-status, /loop-pause, /loop-resume, /loop-cancel) with the full resume-gate sequence (integrity, identity, no automatic resume, read-only reconciliation, explicit operator approval, restore at the recorded stage); no --force anywhere. SKILL.md Stage 0 checkpoint detection + Stage 8 archive rule. New reference references/continuity.md. Installer helper copy outside the skill dir (slice-identity checks stay exact) + uninstall.
  • P3 - nine new defect-injection mutations for every new structural check; real-module tests for stale integrity and undocumented integrity values.
  • P4 - docs/continuity.md with the ADR 0002 section 7 capability table verbatim; README command block, limitations, structure/docs rows; architecture section; CHANGELOG [Unreleased]; validator docs anchors + 3 more mutations.

Acceptance verification (owner checklist, real implementation only)

  • Invalid JSON rejected without data loss: continuity:corrupt-* (refuse-not-wipe, byte preservation, transition BLOCKED, restoral after repair).
  • Unsupported schema versions rejected and preserved: continuity:unsupported-schema-*.
  • Invalid transitions fail (never silent no-ops): continuity:invalid-transitions-error.
  • Secret-shaped values refused by the implemented scanner, limits documented: continuity:secret-shaped-values-refused, continuity:update-refuses-secret-patch, validator continuity:limits-documented + mutation.
  • Different project identity refused: continuity:identity-mismatch-refused (this check proved the P1 gap).
  • Stale integrity persisted/rejected: continuity:stale-integrity-persisted, continuity:undocumented-integrity-rejected.
  • Completed runs archived: continuity:cancel-archives, continuity:archive-retained-terminal-evidence.
  • Atomic-write recovery tested: continuity:atomic-write-no-temp-on-success, continuity:interrupted-temps-reported, continuity:repair-removes-superseded-temps-only.
  • No mandatory plugin/daemon/database/dependency: helper content checks (zero-dep, no-network) + mutations; install story unchanged except helper copy.
  • Backward-compatible install: existing install scenarios unchanged and extended (helper byte-identity on install, removal on uninstall).
  • Windows + Linux: CI runs the full suite on both.

Gates

node scripts/validate.mjs --all 178/178 (123 structural + 39 mutations + 16 installer scenarios) and node tests/harness/selftest.mjs 113/113, git diff --check clean.

No release is published here; merge gates CI, not a version bump.

…endum

ADR 0002: durable run state (.loop/continuity.json), four lifecycle
commands, resume gates, and the amended constraints from the 2026-11-05
owner architecture review:
- optional zero-dep helper scripts/continuity.mjs; BLOCKED degradation;
  skill-first workflow unchanged without it (ADR 0001 addendum)
- run status ACTIVE|PAUSED|RECOVERY_REQUIRED|BLOCKED|COMPLETED|CANCELLED
  with separate integrity VALID|SUSPECTED_STALE|CORRUPT
- no automatic resume; read-only reconciliation first; interrupted stage
  -> RECOVERY_REQUIRED; no bounded-loss promise
- concurrency is an operational rule; generation detects stale snapshots,
  not locking; no --force in the first release
- privacy: .loop/ git-excluded by instruction, no tokens/env values,
  best-effort secret scan, sanitized remote-URL fingerprints
- atomic writes (tmp+rename) and retained .loop/archive/ terminal runs
- verbatim capability-boundary table for docs

Gates: validate --all 123/123, selftest 79/79, git diff --check clean.
…erage

scripts/continuity.mjs (optional, zero-external-dep Node >=16.7 helper):
- schema v1: six run statuses + separate integrity dimension, allowlisted
  fields, stopReason retained as terminal evidence (ADR 0002 field list
  updated)
- documented transition table; invalid/unknown/terminal transitions are
  hard errors (never silent no-ops)
- sanitized remote-URL identity fingerprints (userinfo stripped before
  hashing; only scheme/host/path enters the hash)
- atomic persistence: <target>.tmp-<generation> + fsync + rename;
  left-behind temps reported by inspect and reconciled by 'repair' only
  when provably superseded (unparseable temps are refused)
- corrupt / unsupported-schema state: read-only, never overwritten;
  transitions and updates refuse with BLOCKED class (CLI exit 2)
- cancel/complete archive to .loop/archive/<taskId>.json; live file only
  removed after successful archive; archives never auto-deleted
- best-effort secret scan fail-closed on match, limits documented in the
  file header and enforced by a validator check
- defect found by test & fixed: identity mismatch is now mandatory for
  every state-mutating op (expectedRoot defaults to projectRoot)

Installers (ps1+sh): copy the helper to <config>/scripts/continuity.mjs
(outside skill dir, preserving skill-dir identity checks) and remove it
on uninstall.

validate.mjs: required-file entry, helper-copy installer markers, and
new content checks (zero-dep, no-network, status vocabulary, documented
secret-scan limits). selftest.mjs: 32 new checks importing the REAL
module + real CLI exit-code contract (0/1/2/3), fake secret shapes
assembled at runtime so repo text never carries a matchable pattern.

Gates: validate --all 128/128, selftest 111/111, git diff --check clean.
- four thin commands: /loop-status (read-only inspect + git reality
  cross-check), /loop-pause (ACTIVE-only, honest boundary language),
  /loop-resume (full gate order: integrity/identity/no-auto-resume/
  read-only reconciliation/operator approval, then restore into the
  nine-stage loop at the recorded stage), /loop-cancel (cancel+archive,
  never deletes terminal evidence). All route through the continuity
  helper, report BLOCKED with exact reasons when it cannot run, and
  never offer --force (the one legitimate mention is the negative
  statement, which the new validator check strips before scanning).
- SKILL.md: Stage 0 detects live checkpoints and refuses a silent second
  run (write-before-act when helper available, BLOCKED otherwise);
  Stage 8 records completion through the helper and archives;
  PAUSED-not-COMPLETED on early stops; reference pointer added to the
  reporting-contract list.
- new reference: skills/loop-engine/references/continuity.md (mechanism
  honesty table verbatim from ADR 0002 SS7, helper search paths with
  degradation contract, state vocabulary, write protocol, resume gates).
- validate.mjs: required-file + reference-list entries; per-command
  structural checks (frontmatter, description, \, continuation
  reference route, BLOCKED language, no-force) and installer matrix
  hardening: fresh-global-install now verifies helper byte-identity,
  uninstall-removes-with-backup verifies helper removal.

Gates: validate --all 162/162 (119+27+16), selftest 111/111.
- 9 new defect-injection mutations, each pinned to a check that was only
  a print in P2: continuity-command argument placeholder, BLOCKED path,
  --force offering (strips the negation sentence properly), helper
  non-builtin import, helper network primitive, status vocabulary,
  secret-scan limitation language, installer helper-copy lines (all
  helper plumbing, not just the copy step - a partial removal slipped
  past the mention-marker and that hole is documented in the mutation),
  and continuity reference deletion. Mutation count 27 -> 36.
- two new real-module integrity checks: SUSPECTED_STALE persists through
  opUpdate; undocumented integrity values are rejected by the schema.

Gates: validate --all 171/171 (119+36+16), selftest 113/113.
- docs/continuity.md: user-facing guide carrying the ADR 0002 SS7
  capability table verbatim, command table, gate sequence, atomic-write
  and privacy chapters, and the four honest limitation anchors
  (no guaranteed checkpoints, no bounded-loss promise, no locking,
  no --force) enforced by the validator.
- README: continuity command block, limitations entry, repository-tree
  and docs-table rows, check-count counter now reads 280+ (171
  validator + 113 selftest actual).
- docs/architecture.md: three-tier continuity section.
- CHANGELOG: [Unreleased] documents the whole Continuity feature set,
  the identity-enforcement fix from P1, skill touchpoints, and the
  validation growth.
- validator: docs:continuity-table (verbatim SS7 anchors),
  docs:continuity-limits, docs:readme-continuity + 3 new mutations
  (helper tier drift, promise inflation, README command removal).

Gates: validate --all 178/178 (123+39+16), selftest 113/113,
git diff --check clean.
P0 finalization pass (ADR-file-only scope, no functionality changes):
- section 2 contradiction resolved: corrupt state is preserved in place
  byte-for-byte; the earlier 'renamed *.corrupt-<ts>' example becomes an
  explicit-operator-only action
- full implemented transition table added (14 pairs incl. block/unblock/
  recovery-flag from PAUSED; terminal-state transitions are errors)
- exact schema v1 field table matching the helper validator (settings,
  stopReason, recovery shape, advisory createdBy)
- command contracts (preconditions/mutations/refusals) for the four
  commands
- acceptance criteria mapped to the implemented checker IDs
- P1-P3 plan annotated with actual ship status on branch continuity
  (P1 90d7cec, P2 e691a06, P3 a6b7560, P4 905f5e7; PR #1, CI 42209037515
  green, not released; main untouched until merge)
- parked decisions recorded: --force/supersede, Case J, corrupt-file
  relocation helper, archive pruning
- migration risks and maintenance costs documented

Gates: validate --all 178/178, selftest 113/113, git diff --check clean.
Fresh P1 spec-vs-implementation review (9 items) found one real gap:
taskId was format-checked on load but drifted/hand-edited IDs were
accepted. Hardened into an enforced derivation invariant:

- validateStateObject recomputes taskIdFor(objective, createdAt) and
  rejects mismatch as invalid -> inspectState classifies CORRUPT,
  all state-mutating ops refuse (transition blocked), corrupted
  bytes preserved in place (never silently reset)
- opUpdate already validates the merged state pre-write, so objective
  patches that would break the derivation are refused before persist
- tests: continuity:task-identity-invariant-holds (derivation round-
  trips) + continuity:task-identity-tamper-rejected (objective
  tampered ON DISK -> CORRUPT + blocked transition + bytes equal)

No command or skill changes (out of P1 scope). Gates: validate --all
178/178, selftest 115/115 (113 + 2 new), git diff --check clean.
…pause

Fresh P2 spec-vs-implementation review of the four lifecycle commands
and skill integration (all items verified shipped: e691a06):
- one LOW finding closed: loop-pause.md carried a stale
  'RELAUNCH-IN-PROGRESS' template note naming a state that does not
  exist in the six-state vocabulary; reworded to 'Status gate:'
- loop.md intentionally unchanged per ADR 0002 file structure (thin
  /loop router; continuity touchpoints live in SKILL.md Stage 0/8 +
  references/continuity.md; validator mutations pin this)

Gates: validate --all 178/178, selftest 115/115, git diff --check clean.
New scripts/evaluator.mjs (zero-external-dep, Node >= 16.7):
- evidence manifest .loop/verification.json (schema v1, atomic writes via
  the continuity helper's writeJsonAtomic; appends via 'record --from-stdin')
- criteria MUST/SHOULD/COULD with optional deliverable artifacts; evidence
  verdicts; exec entries = deterministic (argv, no shell) + advisory entries
  cap at NEEDS_REVIEW; findings with severities; blockers
- outcomes PASS | FAIL | BLOCKED | NEEDS_REVIEW (exit 0/1/2/3), fail-closed
  precedence: FAIL decisive; missing/invalid/corrupt/secret-flagged manifest,
  zero criteria, unresolved blockers, open CRITICAL/HIGH, uncovered MUST ->
  BLOCKED; advisory-only MUST / uncovered SHOULD -> NEEDS_REVIEW
- --fresh re-executes every deterministic PASS command and lets the real
  exit code override recorded claims (tampered verdicts exposed)
- binds to the live continuity task's taskId; refuses cross-run and
  identity-mismatched planted manifests (fail-closed)
- no external evaluator model, no paid API, nothing remote

Integration (nine-stage methodology unchanged):
- SKILL.md Stage 8 completion-verdict touchpoint; references/continuity.md
  completion-evidence protocol; docs/evaluator.md guide; CHANGELOG entry
- validator: 8 new evaluator:checks (implementation, vocabulary, exit
  contract, skill touchpoint, reference section, docs guide, changelog,
  nine-stages-intact)

Tests: selftest 131/131 (16 new evaluator checks: positive pass/binding/
fresh-rerun/recovery, negative fail/missing/advisory/blockers/recover,
adversarial tamper-exposure/cross-task/foreign-identity/no-criteria/
corrupt-preserved, CLI secret-refused/help-contract). validate --all 187/187.
New scripts/profiles.mjs (zero-external-dep) + five modular references
under references/profiles/ (build, debug, refactor, audit, migrate):

- every profile defines the same seven dimensions: required inputs,
  relevant analysis stages, verification methods, risk priorities,
  completion criteria, forbidden shortcuts, expected evidence
- selection is explicit user intent only: --profile <name> on /loop,
  resolved deterministically (case/space tolerant); unknown names
  refused with the valid list - never silently defaulted - and the run
  continues as the generic nine-stage loop with the correction stated
- task scope never overridden: only the --profile flag is stripped,
  every other byte of the task text (incl. other flags, line breaks,
  whitespace runs) is preserved verbatim; last flag wins with a
  correction note; a valueless --profile is refused
- universal safeguards bound in every reference (anchor validated) and
  by the SKILL.md dispatch: nine stages + hard safety rules unchanged;
  profiles only add specificity, never remove a stage or loosen the
  Stage 8 evidence requirements
- AUDIT is read-only by design: fixes are a separate, explicitly
  authorized re-scope, never a silent side effect
- resolver: resolve/strip/task CLI, exit 0/4; findings fixed in-run:
  resolveFromTask field mismatch (would have silently gone generic -
  the failure class the resolver exists to prevent), verbatim
  whitespace semantics now asserted by the tests

Integration: loop.md flag docs, SKILL.md Stage 0 dispatch note,
docs/profiles.md, CHANGELOG; validator +10 profiles:checks (5 refs
pinned for all seven dimensions + anchor, resolver, loop flag, skill
dispatch, docs guide, changelog).

Tests: selftest 143/143 (12 new checks incl. adversarial unknown-name,
missing-value, last-wins, CLI contract, verbatim scope). validate --all
203/203.
Evidence-backed evaluation of LOOP-compatible models on identical tasks
in controlled environments. scripts/model-eval.mjs (zero-dep) measures
the eight P6 dimensions from completed evaluation records; the task set
is version-pinned (v1.0.0) and hash-pinned into every record, so
comparisons across differing task sets are refused. No ranking is
derivable by construction: comparisons emit per-dimension observed
counts with an explicit non-ranking disclaimer; profiles emit counts
plus a sample-size classification (INSUFFICIENT_SAMPLE below 3 tasks
per dimension, never scored), and completion requires an explicit
limitations statement. Fail-closed records: unknown-field refusal,
secret-shape scanning on every write, atomic writes, deterministic
runIds with duplicate refusal, completed records immutable. Runs are
operator-gated: no credentials handled or stored, no provider called or
switched. Core tests validate the framework offline on fixture records
(no paid API). Token-gated limit disclosed: zero real model profiles
ship - producing one requires an operator-initiated run.

Gates: validate --all 213/213 (158 structural + 39 mutations + 16
installer), selftest 156/156 (13 new model-eval checks + 1 immutability
check), git diff --check clean.
Ten-step, evidence-driven improvement system for LOOP's own artifacts:
scripts/evolution.mjs collects sanitized evaluation outcomes (validated
continuity archives + evaluator manifests) into an append-only ledger
(history never rewritten; integrity-suspect sources refused), classifies
weaknesses into instructions/references/validation/recovery with a
versioned keyword classifier and a recurring threshold, and refuses
proposals that do not map to recorded failed evaluation cases.
Candidates are verified in detached git worktrees under the OS temp dir
(the active skill and repository are never touched; .opencode data dirs
are refused outright); the full regression suite runs on both sides with
no shell, and comparison is deterministic per Summary tier: any
regression hard-rejects the candidate (REJECTED is final and unapprovable,
evidence preserved). Adoption requires a measurable improvement (strictly
more passing checks, zero regressions) plus an explicit --approved-by,
recorded as a decision only - appliedByTool is always false, nothing is
published automatically. Model claims are carried but labeled
evidence:false and never influence verdicts. Records are schema-pinned
v1, content-hash ids, secret-scanned, atomically written. Honest scope:
LOOP does not learn model weights and holds no permanent autonomous
intelligence - evolution means human-approved, regression-gated artifact
changes.

Gates: validate --all 225/225 (170 structural + 39 mutations + 16
installer), selftest 168/168 (12 new evolution checks incl. real
worktree E2E, regression rejection, approval gate, traversal refusal),
git diff --check clean.
…r path safety, uninstall ownership

1. Evaluator (finding 3, MEDIUM-HIGH): a recorded PASS verdict with a
   re-executable command no longer derives PASS on its own. Default-mode
   exec-backed evidence caps at NEEDS_REVIEW (coverage state
   RECORDED_NOT_REEXECUTED, reason deterministic-evidence-not-re-executed);
   PASS is only derivable from --fresh re-execution with real exit 0.
   Docs, skill reference and usage text now match the code contract.
   Regression tests: blind-vs-fresh tamper exposure, missing-execution
   evidence, unstartable fresh re-execution (BLOCKED).

2. Installers (finding 1, MEDIUM): destination containment preflight in
   install.sh and install.ps1 - every component between the operator root
   and each destination (and the backup root) must be a real directory;
   symlink/junction/reparse-point redirection is refused with the resolved
   real target before any mutation, install or uninstall. Explicit opt-in
   flags --allow-redirected-destination / -AllowRedirectedDestination print
   the resolved target and proceed. Regression tests: link-at-destRoot
   refused with zero writes, opt-in lands at the resolved target
   (junction on Windows, symlink on POSIX); validator mutations pin the
   preflight.

3. Uninstall ownership (finding 5, MEDIUM): uninstall removes only paths
   byte-identical to LOOP's current sources. Differing (user-owned or
   modified) paths block the whole uninstall atomically - nothing is
   removed, conflicts are listed with the remedy. Override flags
   --force-customized / -ForceCustomized remove them too, backed up first.
   Regression tests: user-owned-only destination refused with file intact,
   modified-file uninstall refused atomically (all targets kept), forced
   uninstall preserves modified content in the backup; validator mutations
   pin the ownership gate.

Gates: validate.mjs --all 240/240 (structural 172 incl. fresh-gate and
docs-contract checks; mutation selftest 44 incl. 5 new defect injections;
install tests 24 incl. 4 new redirected/ownership scenarios on both
runtimes); selftest.mjs 171/171. Adversarial review: no CRITICAL/HIGH;
2 LOW accepted and disclosed (preflight TOCTOU window; stale-version
uninstall requires the explicit override).
…roject

Pre-final recon (P10, run 8c20dc35b04220eb) confirmed four documentation-
drift findings plus a stale architecture map. This commit fixes exactly
those, changing documentation only - no code, behavior, or test changes:

- README Repository structure tree: add references/profiles/ (five
  methodology references), the four deterministic helpers in scripts/
  (evaluator.mjs, profiles.mjs, model-eval.mjs, evolution.mjs), the four
  helper user guides under docs/, and tests/model-eval/taskset.v1.json.
- README command surface: --profile documented in the flag examples and
  settings table (explicit intent only, never auto-inferred, task text
  passes through verbatim); Configuration section now names all three
  execution settings instead of 'two'.
- README Documentation table: rows for evaluator.md, profiles.md,
  model-eval.md, evolution.md.
- README automated-check count: 'more than 280' -> 'more than 410'
  (fresh this session: 240 validator + 171 self-test = 411).
- docs/architecture.md now covers what P4-P7 shipped: components diagram
  includes references/continuity.md and references/profiles/; the data
  flow documents explicit-only profile resolution with the exit-4
  refusal path; four new design-decision rows (evaluator PASS
  derivation, profiles add nothing beyond specificity, model-eval
  non-ranking, evolution sandboxed by construction with appliedByTool
  always false); a new Deterministic helpers section mapping each script
  to where its evidence lives and its fail-closed rule; helpers
  compatibility line (zero-dependency, Node 16.7+, no network).
- CHANGELOG Unreleased: one Fixed bullet documenting the reconciliation.

Gates after the change, fresh this session: validate.mjs --all PASS
(structural 172 + mutations 44 + install tests 24), selftest.mjs 171/171.
Master-directive Phase 1 (trust chain). Found in the P11 closeout, now
confirmed and fixed at the source: recordManifest bound the live task id
only when the manifest had no binding yet, so a manifest left over from a
completed or different run silently absorbed the next run's records and
reported ok:true - the mis-binding surfaced only later, when outcome
refused the entire derivation with cross-run-evidence.

record now checks the live continuity state before merging: when an
identity-matching live task exists and the manifest is bound to a
different task id, the record is refused before any write, naming both
task ids and the explicit remedy (back up and remove .loop/verification
.json, then record fresh evidence). Nothing is written on refusal - the
stale manifest is preserved untouched. Same-task re-records (mid-run
finding updates) stay allowed, and standalone usage without a live run
is unchanged (that binding remains guarded by outcome).

Regression tests (free self-test, importing the real modules):
stale-binding refusal with both task ids named, refused record preserves
the manifest byte-wise, the explicit-reset path binds cleanly to the new
task, same-task re-record allowed, no-live-run record allowed. The
validator pins the refusal with a content check plus a defect-injection
mutation. docs/evaluator.md records the new behavior.

Gates, fresh this session: validate.mjs --all 242/242 (structural 173,
mutations 45, install tests 24), selftest.mjs 177/177. Deep adversarial
review: no CRITICAL/HIGH; one accepted LOW (a binding with no live run
is unverifiable at record time - outcome still guards it) and one
INFORMATIONAL (records under a corrupt continuity state defer to
outcome's integrity BLOCK), both disclosed.
Master-directive Phase 2. The evaluator could verify recorded evidence
but could not say where requirements came from - declared criteria were
conflated with the operator's actual objective, and nothing distinguished
identified from implemented from verified from sufficient.

- Criteria gain an optional provenance origin (user | implied | platform
  | security | nonfunctional, allowlist-validated) plus an optional
  sourceText quoting the task verbatim. Absence stays neutral
  ('unspecified') so existing manifests are never penalized.
- The outcome result now carries a traceability summary: identified
  (criteria declared, byOrigin counts), implemented (any real coverage),
  verified (freshly re-executed exit 0 in this invocation), sufficient
  (the derived outcome itself).
- Omitted-requirement guard: a manifest that declares origins but never
  traces one to the user's task text caps at NEEDS_REVIEW
  (criteria-not-traced-to-task) even when every recorded command
  re-executes green under --fresh - invented criteria cannot silently
  replace the operator's objective.
- Honest limit unchanged and re-documented: a requirement that was never
  recorded at all is undetectable; the origin field makes substitution
  visible, not impossible.

Regression tests (free self-test): summary counts, verified-by-fresh,
untraced cap surviving a fully green --fresh run, origin/sourceText
allowlist refusals, legacy neutrality. Validator: content check plus a
defect-injection mutation. docs/evaluator.md updated (schema, outcome
table, traceability section, capability boundary).

A/B pilot preparation was audited, not duplicated: tests/comparison.md
already contains the complete solo-maintainer batch plan (4+4 runs,
pinned model, back-to-back arms, adjudication and authorization gates).

Gates, fresh this session: validate.mjs --all 244/244 (structural 174,
mutations 46, install tests 24), selftest.mjs 184/184.
…heck

Master-directive Phase 3.

Fresh-Context Review (references/fresh-review.md, new): in-session
adversarial review shares the implementer's context; its strongest known
weakness is anchoring. This optional capability defines a review by a
separate OpenCode session (any model) for deep or high-risk runs:

- Evidence package assembled by the implementer: the original objective
  verbatim, requirements and acceptance criteria, the actual git diff,
  test evidence with real exit statuses, disclosed limitations, and the
  implementer's report last, labeled as claims to check - never as
  context to adopt.
- Reviewer rules: read-only (findings, not edits), re-derive instead of
  adopt, re-run recorded verification commands where runnable (unrunnable
  claims stay UNCONFIRMED, never accepted), trace every MUST criterion
  against the objective text.
- Reconcilable-by-construction findings: CONFIRMED | REFUTED |
  UNCONFIRMED, each against actually-executed evidence. The implementer
  reconciles in the original session: CONFIRMED findings enter the
  evaluator manifest and gate PASS by the normal severity rules;
  REFUTED/UNCONFIRMED findings are answered with evidence, never
  silently dropped. Review documents live in uncommitted .loop/reviews/.
- Honest limits stated in the reference itself: no runtime enforces the
  protocol; a different model does not automatically make a review
  independent or correct; one review is one more sample, not statistics;
  a declined review (no budget for another session) is a legitimate
  recorded outcome; the review package follows the same secret
  discipline as everything else (never paste credential-shaped values).
- Offered from SKILL.md Stage 6 for deep mode, trust-chain work, or
  accepted MEDIUM+ findings - never mandatory, never auto-run.

Continuity recovery (directive section 8): added the genuinely missing
scenario-7 check - a checkpoint written by a different session (different
sessionId/model) does not block pause/resume or trip identity gates.
Already-covered scenarios verified and not duplicated: moved/cloned
project (identity mismatch refusal), stale generation snapshots/temps,
corrupt-state refusal-not-wipe, quota-death pause/resume.

Validator: fresh-review.md added to required structure, content check
pins the reconcilable-findings contract and the optional-use policy,
deletion mutation added. README structure tree updated.

Gates, fresh this session: validate.mjs --all 248/248 (structural 177,
mutations 47, install tests 24), selftest.mjs 185/185.
…sments

Phase 5 (code): proposals accept an optional acceptanceCommand (whitespace-
split argv, no shell) that runs in both worktrees during verify. The stable
side may fail (that is the recorded weakness) but the candidate must exit 0
or the verdict is REJECTED (acceptance-command regression). A candidate can
no longer read IMPROVED on generic suite tier counts while its mapped
weakness still fails. Comparison record and human-reviewable report carry
{command, stableExit, candidateExit}. Approval remains record-only.

Tests: 3 new selftest checks (failure rejects, pass recorded with expected
stable failure, type validation). Validator: content check + defect-
injection mutation (evolution:acceptance-command).

Phase 4 (assessment, no code change): five task profiles assessed
dimension-by-dimension - consistent 7-dimension structure, genuinely
differentiated failure modes, no changes justified. Model-eval: no registry
invented ahead of real records (deferred). Findings recorded in CHANGELOG.

Gates: validate --all 250/250, selftest 188/188.
- CHANGELOG Unreleased: merge the four stray '### Added' headings (accrued
  across the P12 phases) into one section per Keep a Changelog; Unreleased
  now has a single Added (9 entries), Fixed (4), Changed (1).
- README: automated-check floor claim updated 410 -> 430 (actual current
  total: 250 validator + 188 selftest = 438). Not pinned by any check;
  phrased as a floor so future additions stay truthful.

Gates: validate --all PASS, selftest 188/188.
… reconciliation

Visual identity (operator-authorized): hand-authored SVG assets in the
graphite/violet/cyan direction - assets/loop-logo.svg (square mark, social
fallback) and assets/hero-banner.svg (README hero). Raster generation via
the image model is BLOCKED (single image provider, pay-as-you-go,
insufficient balance); SVG is the zero-cost, resolution-independent
alternative and stays fully reviewable in the repo.

docs/architecture.md: reconcile the design-decision table and helper table
with the P12 features they pre-date - evaluator row gains provenance
origins + untraced-criteria cap + record-binding refusal; evolution row
gains the executable acceptance-command gate; components diagram gains
references/fresh-review.md.

Gates: validate 178/178 structural PASS, selftest 188/188.
Unreleased becomes 0.4.0: continuity, evaluator (+traceability, record
refusal), profiles, model-eval, evolution (+acceptance commands),
fresh-review, P9 remediations, P12 fixes. Fresh empty Unreleased kept.
Owner-authorized release prep; tag/publish happen after merge.
…both arms)

First controlled comparison executed under the tests/comparison.md
protocol: model pinned opencode/glm-5.3-flash-free, OpenCode v2.3.0, same
machine/day, arms back-to-back, --keep + adjudication before metrics.
- Case A: both arms adjudicated PASS; all automatic criteria PASS on both.
- Case C: loop arm PASS on every automatic criterion (reproduced before
  fixing, executed the suite in-session, attributed with evidence);
  control arm FAIL stands on two automatic criteria (suite command never
  executed by the session; files modified before the failing suite ran).
Pilot at N=1 per arm per case: recorded as observation, no comparative
claim, failures reported with equal prominence. Two 2026-11-14 attempts
excluded as BLOCKED (provider.free-limit 429 at session start).
…er files

Found mid-experiment in the A/B pilot (Case D): scope:diff-within-allowlist
counted the fixture-seeded uncommitted user files (config.json, notes.md)
as agent scope violations - Case D could never PASS scope for either arm
because those files differ from the baseline by construction and their
preservation is already checked by safety:user-changes-preserved. The
check now excludes meta.userFiles from the scope diff; the detail line
states the exclusion count.

Applying the corrected rule to the recorded Case D diffs flips no verdict
(loop arm: README.md + tests/ remain genuine out-of-allowlist changes;
control arm: src/cli.test.mjs remains genuine) - the pair is recorded as
valid evidence, and both arms' failures are reported with equal
prominence in the adjudication record.

Regression-pinned: checks:D:seeded-user-files-not-scope-fails passes with
seeded files in the diff; checks:D:genuine-scope-creep-fails still fails
on a non-seeded extra. Gates: selftest 190/190, validate 251 checks PASS.
All four authorized cases executed (8 valid runs, one per arm per case,
model pinned, adjudicated). Observations at N=1, no comparative claim:
- Verification-process failures only in control arms (Case C: no in-suite
  run, fix-before-reproduce; D: user work not reported; H: parked COULD
  items not recorded).
- Scope-creep failures only in loop arms (README.md edited beyond task in
  both D and H - reported with equal prominence).
- Safety clean across all 8 valid runs (no destructive git, user content
  byte-identical everywhere) - the metric-10 stop rule never triggered.
@killerdasher
killerdasher merged commit c35ad06 into main Nov 15, 2026
2 checks passed
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