2 Commits
Author SHA1 Message Date
Nick ca4f7593d7 feat(corrections): #314 defect fix, credential rotation, release guard, task lifecycle, route scoping, PL1 records + metrics
CORRECTION 1: #314 reopened — recall_with_associations mode field defect
CONFIRMED in current source and FIXED (mode: association_merged).

CORRECTION 3: Gitea credential removed from remote URL (credential helper).
TOKEN EXPOSED: yes (in diagnostic output). TOKEN ROTATED: not yet (requires
Gitea web UI access). Remote URL now shows username only, no secret.

CORRECTION 4: duplicate-release-commit defect ROOT CAUSE: convergence
computed warranted bump from commits-since-tag without checking if master
version already satisfies the bump. FIX: already-converged guard in
version_convergence.py (master version > last tag → no commit). Repo-aware
(args.repo passed to read_version/latest_tag).

CORRECTION 6: lifecycle terminalization — execution exception now
guarantees task terminalizes as failed with evidence (no immortal RUNNING).

CORRECTION 7: route instruction task-scoped on RuneTask.route_instruction
(NOT shared operator state). Read-only leading-verb override. Isolation
tests prove no cross-contamination between interleaved tasks.

PL1-01/02/03/05: pl1_records.py (route resolution, proof level, failure
class, candidate status), metrics with honest NOT_YET_MEASURABLE semantics,
route-instruction learning loop (PE-1789102658-0269 SEED).

1253 tests green; ratchet 352/80 (shrink); henxels clean.
2026-09-11 15:36:08 +01:00
Nick 1cbf2b4b18 feat(OBS-1): StageAttempt telemetry — per-attempt lifecycle, observational invariant (closes #287)
scripts/stage_telemetry.py:
- StageAttempt: attempt_id/event_id/stage/issue/process_id, started/finished
  ISO timestamps, terminal_status (COMPLETED|GATE_FAILED|FAILED|TIMEOUT|
  INTERRUPTED), observed windows (model/tool/gate/persistence) with
  monotonic pairs, counters (model_calls, tool_calls, repo_reads,
  external_queries, sources, retries, reconciliation, implementation
  corrections, ci_failures), provider tokens as UNKNOWN_NOT_EXPOSED when
  unavailable (never estimated-as-measured)
- TelemetryLedger: append-only attempts.jsonl — survives restart; every
  attempt (success AND failure) persists independently; persist() NEVER
  raises into the stage path (observational invariant, narrowed excepts)

Wired into StageExecutor.execute(): every attempt gets a lifecycle record
at the terminal path; duplicate no-ops are not attempts.

Explicitly non-additive: wall_time ≠ model_time + tool_time when MiMo waits
on tools or relay overhead overlaps — records carry window counts and an
overlap note; reports must distinguish exclusive/overlapping/residual.

Sanity matrix proven: success → fail → retry → successful retry, all four
attempts present independently with unique attempt_ids; restart/reload
preserves them; DUPLICATE no-ops not recorded; telemetry-absent runs produce
identical process decisions (observational invariant as a test).

8 tests. Full suite 1138 passed (was 1130). Ruff clean; lint counts at
baseline (80/352).
2026-09-09 16:48:26 +01:00