Skip to content

[agent] sprint-executor: task-d98bb271 - #695

Open
sunholo-voight-kampff wants to merge 2 commits into
devfrom
coordinator/task-d98bb271
Open

[agent] sprint-executor: task-d98bb271#695
sunholo-voight-kampff wants to merge 2 commits into
devfrom
coordinator/task-d98bb271

Conversation

@sunholo-voight-kampff

Copy link
Copy Markdown
Collaborator

Autonomous task task-d98bb271 completed and pushed by agent sprint-executor.

This PR was opened deterministically by the AILANG coordinator wrapper.

View execution chain: ailang chains view task-d98bb271

ailang-agent and others added 2 commits August 13, 2026 13:13
…ing (M2+M3)

Completes M-MISSION-LOOP-UNIFIED-TELEMETRY. M1 (session-keyed chain linkage)
landed in 56b449d; this is M2 and M3.

M2 — a mission iteration reported $0.0000 while holding $0.1077. Two defects
with DIFFERENT owners, which is why they are separate changes:

  * writer-side: PostIteration created stages and never transitioned them, so
    every stage kept CreateStage's pending default. IterationStage now carries a
    per-stage `status`.
  * caller-side: IterationStage already carried TokensIn/TokensOut and already
    passed them to UpdateStageMetrics — the zeros came from the poster. The
    mission-control skill now supplies the real counts.

Stage cost/tokens are also aggregated into the chain total, which nothing
credited before.

`status` is per stage on purpose: a stage that failed reads back `failed`, and
StagesCompleted excludes it. Blanket-completing an iteration's stages would
satisfy "nothing left pending" while hiding the failure, so that is tested
against rather than merely avoided. An omitted status stays valid and leaves the
stage pending (the skill and the CLI ship independently); an unrecognised value
is rejected loudly rather than coerced.

M3 — PostIteration now writes through a narrow IterationSink, a strict subset of
observatory.Backend, so the Firestore store satisfies it (compile-time assertion
added there). UpdateStageEvalAssessment is SQLite-only, so it is an optional
IterationModelSink upgrade whose absence is reported, never silent.

PostToLegs/FlushLegs write to every destination this NODE has configured: local
always, cloud when AILANG_STORAGE=gcp. Nothing is rig-specific. hybrid is
deliberately not a cloud leg — it resolves the observatory to local SQLite, so
treating it as one would dual-write the same database twice.

Each leg spools SEPARATELY. A shared spool would replay a post the local leg
already stored, duplicating that chain on every flush. This extends the existing
bounded+loud spool rather than inventing a fail-soft policy: the 100-entry /
1 MiB caps hold, every buffering event warns, and the command still exits 0.

`ailang chains list|view --remote` reads the configured cloud observatory. Local
stays the default; --remote with no cloud configured is an error, because a
remote query silently answered from SQLite would report a cloud-side record as
absent when it was never queried.

Not done: the live cloud read-back, which needs credentials the sprint sandbox
does not have. Recorded in the design doc and the handover.

Tests: the SQLite read-back tests run in CI; every accounting rule is ALSO
covered by cgo-free fake-sink tests, because this sandbox has no C toolchain.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Matches the surrounding style in iteration_post.go; no behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant