Repository navigation
Report ledger freshness in agent-observer health - #150
Conversation
Agent work on this PREstimated cost at least $2.27 · 72 responses · 64 sessions · 4.7 h wall time
Flags: 3 human corrections · 65 large tool outputs · 1 permission request · 12 repeated commands · 4 repeated failures · 11 repeated reads · 8 repeated skill loads · 10 tests edited after a failure · 4 unpriced responses Details: snapshot, prices, coverage, counters
Token counters by model (native counter semantics; never added across semantics):
Generated tokens (reasoning and other output are disjoint; other output includes code, tool calls and replies):
Usage by work phase (this task's own responses):
Recorded activity by phase (observations, not separate token bills):
Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.
Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown. Local measurement from native records; usage totals are not billing. Updated in place by |
lukemaj
left a comment
There was a problem hiding this comment.
Independent review verdict on 92423fad76b81b4c5881610f77ad602a734a68db: FAIL: changes requested.
- Router-owned Codex rollouts are missing from freshness discovery. Default sync imports rollouts under
codex-sessionsandkits/*/sessionsinto the Codex ledger. Health only checks Codex’s normal, archived, and Chromeria bare roots, plus the Router database underrouter. If one of those rollouts grows whilejobs.dbstays unchanged, health can exit 0 with missing Codex work. Reuse the rollout discovery in health and add a fixture where only a Router-owned rollout advances. - An unreadable native directory can look empty. Grok discovery discards
OSErrorfrom listing both the root and its project directories. If the only newer Grok sessions are under a directory the health process cannot list, health can reportno_native_recordsorcurrentand exit 0. Preserve discovery errors for health while keeping absent optional roots valid. - A damaged ledger can abort health before JSON is emitted. A SQLite ledger with the current schema marker but missing
import_errorsopens successfully, then raises inidentity_conflicts()before either output format is emitted. The corrupt-file fixture covers failure at open only. Report the failed query as unavailable, preserve the other results, and test exit 4 with valid JSON.
The text and JSON paths share the same exit decision. The fixtures cover per-harness isolation, the exact interval boundary, absent and empty ledgers, Grok directory counting, and OpenCode part updates in WAL. Older schema markers take the unavailable path, and the version mirrors agree at 1.6.0. git diff --check passed. The test and real-copy runs are reported in the PR. This review was static and did not rerun them or access private session data.
lukemaj
left a comment
There was a problem hiding this comment.
Round 2 independent review of 41e952807dfb430dd5ff264079b9f84b2a8e1d08: FAIL, changes requested.
- Unreadable Claude and Codex sources can still look healthy. A stale Claude transcript or Router-owned Codex rollout returned exit 4 while readable. Removing directory read permission changed both to exit 0 with
no_native_recordsbecause glob discovery suppresses the scan error. An unreadable Codex bare root also returned exit 0 even though the bare-root report explicitly saidunreadable. Propagate discovery errors and known unreadable bare roots to freshness, while preserving the existing behavior for missing optional roots. - Grok strict discovery still hides permission errors during file checks. In a fixture where the session directory could be listed but lacked search permission,
statofupdates.jsonlraisedPermissionError._looks_like_session()swallowed that error throughos.path.isfile(), and health returned exit 0 withno_native_records. Make the file checks propagate permission errors in strict mode.
Fourteen focused tests passed, including Router fallback and alternate roots, interval and never-synced behavior, visibility, and valid JSON after the identity query fails. Two further fixtures confirmed that missing Grok bare roots remain optional and unreadable Grok bare roots fail health. GitHub proof passed for this head. Independent runtime verification used synthetic fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 3 independent review of 2249476d9302073fd13990b287a5b32ae1d7b52e: FAIL, changes requested.
- A denied Chromeria V2 database can make health exit 0. With a stale V2 database behind a symlink, health exited 4 while the target was accessible. Denying search permission on the target directory made
statraisePermissionError, butstate_path()fell back to the absent V1 database and health exited 0 withno_native_records. Make strict state selection propagate access errors into both T3 freshness and bare receipt discovery while preserving fallback for an absent V2 database. - Grok health misses sessions that sync imports from metadata. A new session containing only
summary.jsonleft health at exit 0 withcurrentand zero newer sources. The Grok importer created a ledger session from that same fixture. Include metadata-only activity in freshness and account for its successful import so the gap clears after sync. - Codex counts hard-linked rollouts twice. Two rollout names linked to the same file produced
newer_sources: 2, while normal sync resolved them to one source. Deduplicate by device and inode, as Codex sync does.
All 140 targeted tests passed, including the prior regression cases and normal sync fixtures. Accessible fixture layouts agreed across strict and ordinary discovery, and GitHub proof passed. Independent runtime checks used synthetic data.
lukemaj
left a comment
There was a problem hiding this comment.
Round 4 independent review of 4aec14d95dd25df8b67128f00e9ec8c0948c3bb3: FAIL, changes requested.
- Grok can report current after failing to read newer metadata. A fixture replaced
summary.jsonand denied read access. Sync reported no failures, retained the old branch, and advancedimported_at, changing health from stale to current. The reverse also occurs: an identical rewrite moves the file’s timestamp forward, but successful sync leaves health stale because the fingerprint matches. Advance the timestamp only after successfully reading or revalidating the metadata, including identical rewrites. - Chromeria health misses WAL activity behind a database symlink. SQLite read a committed row through the V2 symlink, but health exited 0 because it checked for
-walbeside the link. Resolve the database path before checking its WAL and add a regression with a real WAL commit.
All 981 deterministic tests passed. Synthetic checks confirmed V1 fallback when V2 is absent, migration from the old Grok metadata schema, and timestamp stability on an unchanged repeat sync. I did not repeat the stale-ledger-copy proof on this head.
lukemaj
left a comment
There was a problem hiding this comment.
Round 5 independent review of 6bfb5ffa6297054bc0ffc896c036695ed446797c: Changes requested. Both blockers reproduced.
- Malformed Grok metadata blocks valid transcript imports. A fixture with a truncated
summary.jsonand a completeturn_completedrecord imported one response on4aec14d; this head reported one failure and imported zero responses. Preserve transcript ingestion when optional metadata fails, surface the metadata failure, and leave its freshness timestamp unchanged. - Router can stay stale after a successful sync. A
VACUUMadvanced the fixture database mtime without changing its rows. Sync revalidated the fingerprint and reportedunchanged, but health still exited 4 with 9,000 seconds of lag. Record successful revalidation when the database or WAL is newer than the stored import time, or measure Router activity from imported records.
All 15 freshness tests passed, including the denied Grok metadata, identical rewrite, and symlinked WAL regressions. git diff --check passed. Independent runtime proof used synthetic fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 6 independent review of fe00d365645064040ee82a6254c25542a82d8de7: changes requested.
- A failed Grok summary read still clears the freshness gap when the transcript is unchanged. In a fixture where only
summary.jsonchanged, sync reportedinvalid Grok summary JSON, imported zero responses, and left the metadata timestamp at11000. The unconditional transcriptfinish()advanced the timestamp health uses to21000, flipping health from exit 4 (stale) to exit 0 (current). Preserve the transcript timestamp when its contents are unchanged and the metadata read failed. - Malformed Grok chat metadata is stamped as a successful import. A metadata-only fixture with invalid JSON in
chat_history.jsonlsetchat_reliable=0, reported zero sync failures, and moved health from exit 4 to exit 0. Distinguish an absent optional file from invalid chat content so valid transcript ingestion can continue while the metadata gap remains visible.
All 18 focused tests passed, including valid transcript ingestion alongside a broken summary. Router revalidation also passed with both a newer database mtime and a WAL-only commit that left the imported rows unchanged. git diff --check passed. Runtime evidence used synthetic fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 7 independent review of 4493cf40907c2aa5a5ff915ea0b28d7753bbe566: Changes requested.
Blocking: An unchanged, empty events.jsonl still lets a failed Grok summary import clear the freshness gap. In a synthetic fixture where only summary.json changed, sync reported invalid Grok summary JSON and imported zero responses, but advanced the empty log’s import timestamp from 11000 to 21000. health --json flipped from exit 4 (stale, 9,000 seconds behind) to exit 0 (current). A full sync reproduced the same failure with an unchanged, complete updates.jsonl. Both paths bypass the guard because JsonlSource.unchanged is false for a zero-offset source or a forced replay.
All 151 focused tests and git diff --check passed. The malformed-chat fixture failed against the previous Grok adapter and passed at this head. The new summary fixture passed on both revisions because its original {} matches the failed-read fallback. With a populated original summary and a complete transcript, I verified that the previous revision returned current and this head returned stale. Runtime verification used synthetic fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 8 independent review: changes requested on 03e098b3996b89c6808e0e37bd21be4cc0c36b2a.
Blocking: Grok import bookkeeping treats a file size or mtime change as import progress even when metadata fails and no complete transcript record was added. In a synthetic fixture, appending an unterminated line and corrupting the newer summary.json left the transcript read offset and metadata import time unchanged. Sync reported invalid Grok summary JSON but advanced the transcript import timestamp from 11000 to 21000. health --json flipped from exit 4 (stale, 9,000 seconds behind) to exit 0 (current). A timestamp-only touch reproduced the same result. Preserve the freshness timestamp in these cases while continuing to ingest valid transcript changes.
Both round 7 regressions failed on 4493cf4 and passed on this head. All 986 local tests and git diff --check passed. Independent runtime evidence used synthetic fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 9 independent review: changes requested on fe4ced666725362b2d1e6e479c2579a20be04fdd.
- An ordinary Grok retry leaves health stale and response metadata missing. I appended a valid completion while reads of
summary.jsonwere denied. The partial sync imported the response and correctly left health at exit4. After access was restored, ordinary sync reported zero failures, but health still showed 9,000 seconds of lag, and the new response still lacked its model and effort. A full replay corrected both. The unchanged fast path needs to reconcile rows from the partial import before recording successful completion, even when the metadata fingerprint matches. - The zero timestamp leaks into existing reports. A first partial import correctly produced
never_syncedin health, but search reportedledger_synced_at: 1970-01-01T00:00:00Z, and the task report's source cutoff was0.0. Keep the transcript import time accurate for existing consumers and track complete-session freshness separately.
All 986 tests, compilation, the CLI version check, and git diff --check passed. The touch, incomplete-append, and first-partial regressions failed on the prior head and passed on this one. Independent runtime proof used synthetic fixtures. The PR's stale-ledger-copy proof covers an earlier head.
lukemaj
left a comment
There was a problem hiding this comment.
Round 10 independent review: changes requested on e4e8060127e4a4186927dbada2007482adc75833.
- Grok recovery can leave duplicate usage and stale health. When
summary.info.iddiffers from the directory name, a denied summary read imports transcript rows under the directory name and stores the pending flag under that key. After access returns, ordinary sync looks up the summary ID and misses the pending replay. In the fixture, sync reported zero failures, health still exited4with 9,000 seconds of lag, and the ledger held three response rows for two completions. - Repeated failed retries advance existing report timestamps. With summary access still denied and the transcript unchanged, a second ordinary sync moved the task report's source cutoff from
21000to21500and advanced search'sledger_synced_at. The pending flag forces a replay whosefinish()records a new import time. - Grok health counts symlink aliases twice. A session directory and its symlink produced
newer_sources: 2. Ordinary sync imported one source and one session.
Both Round 9 cases passed when the summary ID matched the directory name. Ordinary retry restored model and effort and moved health from exit 4 to 0. A first partial import kept health at never_synced while search and task reports showed the actual transcript import time.
All 986 tests, compilation, CLI version, and git diff --check passed. Independent runtime evidence used synthetic fixtures. The exact-head stale-ledger-copy run is documented in #149.
lukemaj
left a comment
There was a problem hiding this comment.
Round 11 independent review: changes requested on b78555530cbb30cac4b80c3c6cdb40f4be4777aa.
Blocking: If summary.info.id differs from the directory name and the summary is unreadable during the first transcript import, Grok saves the response and pending retry under the directory name. Once the summary becomes readable, ordinary sync looks for the pending retry under the summary ID and misses it. I reproduced two outcomes with one completion: an empty ledger ended up with two response rows while health exited 0, and a ledger with a prior metadata-only import stayed 9,000 seconds behind with health exiting 4, even though sync reported zero failures. Recovery needs to reconcile the pending import by source across the identity change.
All 37 health tests passed, including the new fixture for an already-recorded transcript. git diff --check and the exact-head GitHub proof check passed. Independent runtime evidence used synthetic fixtures. The stale-ledger-copy proof was outside this review.
lukemaj
left a comment
There was a problem hiding this comment.
Round 12 independent review: changes requested on d25a9873b915f82ff2c9e207e7ac492ebdc5dfb9.
Blocking: When events.jsonl is the first log imported while summary.json is unreadable, Grok records the directory name as the session ID. On retry, the recorded ID overrides both the recovered summary and a later update carrying the correct ID. I reproduced health --json switching from exit 4 to exit 0 while the ledger still held two session rows, with the event and response attached to grok:directory-id instead of the existing grok:native-id row. The same split occurs when the first completion has no sessionId. Reconcile the provisional ID with the recovered native ID before marking the retry complete.
The new ID-bearing fixture failed on the prior head and passed on this one. All 988 tests, compilation, the CLI version check, and git diff --check passed. Runtime verification used synthetic fixtures. The stale-ledger-copy evidence reviewed covers an earlier head.
lukemaj
left a comment
There was a problem hiding this comment.
Round 13 independent review: changes requested on 4584bd9e6a844e7a34dee16c5d077953a9eba529.
The denied-summary case now recovers correctly. When the first sync sees events.jsonl alongside a missing or empty summary, it still records the directory name as the session ID. I reproduced a later sync that received native-id in both the summary and the update but attached the response to grok:directory-id and reported health current with exit 0. Treat directory-derived IDs as provisional and reconcile them when the native ID arrives.
GitHub's proof check passed, along with 153 focused tests and 19 placement tests locally. I stopped the local full-suite retry when a placement test reached the host Cue database and reran placement with an isolated Cue path. Independent behavioral evidence used synthetic fixtures. The reported stale-ledger copy run covers the previous head.
lukemaj
left a comment
There was a problem hiding this comment.
Round 14 independent review: changes requested on af16e49b6f1c6a6eb61218e007957021cd3f3892.
- Valid events-only sessions can stay unimported. With a missing or empty summary, a supported
turn_startedevent carryingsession_id: "native-id"imported zero events and returnedGrok session identity unavailable. The previous head imported the event. Use the validated event ID before deferring. - A readable summary without an ID still locks in the directory name. With
{"head_branch":"main"}as the initial summary, sync stored the event undergrok:directory-id. After both the summary and an update suppliednative-id, sync still attached the response togrok:directory-idandhealth --jsonexited0withcurrent. Resolve identity from a validated ID before treating a directory-derived key as final.
The denied, missing, and empty summary recovery cases passed, along with 219 focused tests covering freshness, JSON, and existing visibility checks. GitHub proof passed. Independent runtime verification used synthetic fixtures. The stale-ledger copy run is documented in #149.
lukemaj
left a comment
There was a problem hiding this comment.
Round 15 independent review: changes requested on b120a9da5baac4a3bee6339f081e0531ecd1bf8f.
- A complete Grok notification with no explicit ID and a readable summary could no longer use its directory as the session ID.
- A recorded legacy directory ID overrode a later explicit summary ID, unlike base behavior.
- A rejected update missing
params.updatecould supply an ID that displaced the valid events stream ID.
The events-only regression passed. Isolated full-suite testing passed 989 of 990 tests, with the lone environment-dependent test passing in a 151-test rerun. Runtime evidence used fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 16 independent review: changes requested on 6954eb0ae9d4ca28d81563c610ada0366ef266ea.
Blocking: With no summary ID, Grok's identity lookup accepts an update before the importer validates it. An unknown update kind and a tool_call missing toolCallId each reproduced the regression: the importer rejected the update but stored the valid turn_started event under grok:wrong-id rather than the native identity. Health returned exit 0 with current status. Require update validation before using its session ID.
The 221 focused tests and GitHub proof passed. Runtime verification used isolated fixtures. The documented stale-ledger copy run covers an earlier revision.
lukemaj
left a comment
There was a problem hiding this comment.
Round 17 independent review: changes requested on 0e79f00b1452d2a4ccf4c8e8fcd590e0120d2c28.
Blocking regression: When a Grok summary is malformed and the only native ID comes from a valid tool_call notification, the completion-only identity check skips the entire transcript. In an isolated fixture, base and the previous head each imported one tool event, while this head imported zero. Accept a tool notification as identity evidence after applying the importer's existing toolCallId validation, and keep reporting the summary error.
Round 16 cases passed independently, including rejection of malformed usage before a valid completion. All 223 focused tests and git diff --check passed. Runtime verification used isolated fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 18 independent review: changes requested on a660c3b13f7ef68c34a3c15c09c36be7521aa45e.
Blocking regression against 75ed333: On first sync with a malformed Grok summary, identity lookup ignores valid user and assistant message updates carrying a native session ID. With those updates as the only identity evidence, base imported one user message and one assistant event. This head imported neither until the summary was repaired. Both tool notification cases now import while reporting the summary error.
GitHub proof, 211 focused tests, and versionctl release-check passed. The local archive run lacked Git history, and all 55 tests in the affected modules passed when rerun from the checkout. Runtime review used isolated fixtures.
lukemaj
left a comment
There was a problem hiding this comment.
Round 19 independent review: changes requested on 8336bc2e67fec498a547280e38b184a2f733d527.
Blocking regression. On first sync with a malformed summary.json, Grok still defers the entire import when its only native session ID comes from a valid auto_compact_started or retry_state update. Base imported one event in each case, while this head imported zero and reported invalid Grok summary JSON. Both kinds are already accepted by the importer. Use that validation for identity recovery while preserving the summary error.
The user-only and assistant-only fixtures both passed. All 993 local tests, GitHub proof, and versionctl release-check --json passed. Runtime verification used isolated fixtures. The stale-ledger-copy run was outside this review.
lukemaj
left a comment
There was a problem hiding this comment.
Round 20 independent review: changes requested on cd6b4935ac403146078f9bcf9d4f21d44a1ad0e2.
Blocking regression: Router sync probes the WAL before opening jobs.db. A readable jobs.db and WAL symlink whose target directory denied traversal yielded exit 0 and JSON with one imported source on base. The PR head raised PermissionError: [Errno 13] and emitted no JSON. Let SQLite determine whether sync can proceed when the timestamp probe fails, and leave the freshness timestamp unchanged if the probe could not verify it.
Round 19's Grok regression is fixed. The 104 focused tests, release validation and GitHub proof passed. Nine local archive test errors came from missing Git history, and all 49 tests in the affected modules passed in a scratch clone. Runtime review used fixtures only.
lukemaj
left a comment
There was a problem hiding this comment.
Round 21 independent review: changes requested on 843de0efa32d45f59c394ecc8312ac1099922bb2.
A denied Claude scan correctly exits 4, but the raw exception reaches both text and JSON and exposes the absolute native source directory. This reproduces on the candidate and is absent on base. Preserve the unavailable result with a path-free reason.
The Router permission regression is fixed. All 995 tests passed in a scratch clone and GitHub proof passed. Runtime verification used isolated fixtures.
lukemaj
left a comment
There was a problem hiding this comment.
Round 22 independent review: changes requested on d6f41d60a73a022fffd31229a499b2a98d001e2c.
- Ledger permission errors expose the absolute ledger path. Denying traversal of a fixture ledger's parent directory made both text and JSON exit 4 and print the path. Use a path-free diagnostic and preserve the unavailable status.
- An out-of-range OpenCode timestamp crashes text health. A fixture with
time_updated=1760000000000000raisedValueError: year must be in 1..9999, not 57742in text mode. JSON exited 4 and reported never synced. Validate timestamps before rendering so both formats report the failure and preserve other harness results.
The prior Claude path disclosure is fixed. All 996 tests, the release check and git diff --check passed. Runtime checks used isolated fixtures.
|
Round 23 independent review: changes requested on
Both Round 22 regressions passed on this head and failed on the prior revision. All 998 tests, release validation, and |
|
Round 24 independent review: changes requested on
The three timestamp regressions failed on the previous commit and passed on this head. |
|
Round 25 independent review: changes requested on
|
|
Independent review passed for PR #150 at In isolated CLI fixtures, a creation-only OpenCode schema and a corrupt database both crashed the prior head before it emitted output. The reviewed head exits All 1,004 local tests passed, including 53 health tests, along with compilation, |
What
agent-observer healthreports each harness's newest native record, newest ledger import, and count of newer native sources.Why A stopped sync could leave the ledger behind while the live-session checks still passed.
So what Health exits 4 when the ledger falls behind. CI and independent review passed. The PR is ready for merge approval.
Closes #149.
Behavior
health --sync-interval-seconds N. Text and JSON show the same measurements. Freshness uses timestamps and counts without emitting transcript content or native source paths.Initial proof
75ed333b0c9928fc306bcfc188f84829594a0d83, head92423fad76b81b4c5881610f77ad602a734a68db.versionctl release-check --jsonpassed.python3 -m unittest discover -s tests -p test_health.pypassed 24 tests. The baseline returned 0 on the stale and never-synced fixtures. Coverage includes stale, current, exactly one interval, a never-synced ledger, an unreadable ledger, and OpenCode part updates in WAL. The 21 bare-root tests also passed.First review fixes
The new head
41e952807dfb430dd5ff264079b9f84b2a8e1d08includes Router-owned Codex rollouts, reports Grok listing errors, and keeps freshness output available when the identity conflict query fails. The three new regressions failed on the initial head and passed on the revised head.The revised head passed 85 targeted tests, compile and version checks, and
versionctl release-check --json. A fresh read-only bestia ledger backup produced exit 4 in both text and JSON at a 120-second interval. Exact output and current proof.Second review fixes
Head
2249476d9302073fd13990b287a5b32ae1d7b52esurfaces denied listings and file lookups through a shared health discovery mode for native adapter paths and bare receipts. Sync uses the existing lenient discovery behavior. Permission fixtures cover Claude, Codex, Router-owned rollouts, Muse, Grok and Codex bare receipts. They failed on the previous head and passed here.151 targeted tests passed, plus compile, CLI version and
versionctl release-check --json. The CLI exited 4 in text and JSON on a read-only SQLite backup of bestia's ledger. Exact stale ledger output and current proof.Third review fixes
Head
4aec14d95dd25df8b67128f00e9ec8c0948c3bb3propagates denied Chromeria V2 state access into freshness and receipt discovery, tracks Grok summary and chat metadata imports, and counts hard-linked Codex rollouts once. The added fixtures reproduced all three issues on the last head. The Grok test also proves a successful fixture sync clears the metadata-only gap.149 targeted tests passed, plus compile, CLI version and
versionctl release-check --json. The CLI exited 4 in text and JSON on a read-only SQLite backup of bestia's ledger. Exact output and current proof.Fourth review fixes
Head
6bfb5ffa6297054bc0ffc896c036695ed446797ckeeps Grok freshness stale after a failed metadata read, clears it after a successful revalidation, and looks for each SQLite WAL beside the resolved native database. The added regressions exercise refused reads, identical rewrites, and a committed WAL behind a symlink. 97 targeted tests andversionctl release-check --jsonpassed. Both output formats exited 4 on a read-only copy of bestia's ledger at a 120-second interval. Exact output.Fifth review fixes
Head
fe00d365645064040ee82a6254c25542a82d8de7continues importing valid Grok transcripts when optional metadata fails and reports that failure without advancing its metadata timestamp. Router records a successful revalidation of newer SQLite files when the logical fingerprint matches. 145 targeted tests andversionctl release-check --jsonpassed. Text and JSON both exited 4 on a read-only copy of bestia's ledger at a 120-second interval. Exact output.Sixth review fixes
Head
4493cf40907c2aa5a5ff915ea0b28d7753bbe566preserves Grok freshness when an unchanged transcript is paired with malformed metadata. Malformed or incomplete chat history is reported as a sync failure. Valid transcript changes are still imported. 159 targeted tests andversionctl release-check --jsonpassed. Both output formats exited 4 on a read-only copy of bestia's ledger at a 120-second interval. Exact output.Seventh review fixes
Head
03e098b3996b89c6808e0e37bd21be4cc0c36b2apreserves the last successful import timestamp for unchanged Grok transcripts when metadata fails, including empty files and forced replays. Both regression cases exited 0 on the previous head and now exit 4. The revised head passed 156 targeted tests andversionctl release-check --json. Text and JSON exited 4 on a read-only bestia ledger copy. Exact output.Eighth review fixes
Head
fe4ced666725362b2d1e6e479c2579a20be04fddcommits valid Grok transcript rows during a partial sync and advances freshness only after a complete session import. The regressions cover an incomplete append, a timestamp-only touch, and a first partial import. All 156 targeted tests andversionctl release-check --jsonpassed. Text and JSON exited 4 on a read-only copy of bestia's ledger. Exact output.Ninth review fixes
Head
e4e8060127e4a4186927dbada2007482adc75833preserves regular transcript import timestamps for existing reports and tracks complete Grok session freshness separately. An ordinary sync retries affected sessions and clears the gap after successful reconciliation. The targeted suite and release check passed. Text and JSON exited 4 on a read-only copy of bestia's ledger. Exact output.Tenth review fixes
Head
b78555530cbb30cac4b80c3c6cdb40f4be4777aapreserves the recorded Grok identity when summary reads fail, preserves transcript import timestamps over repeated unchanged failures, and counts symlink aliases once. A regression fixture exercises all three and verifies recovery restores the two responses' model and effort. 147 targeted tests andversionctl release-check --jsonpassed. Exact output on a read-only ledger copy.Eleventh review fixes
Head
d25a9873b915f82ff2c9e207e7ac492ebdc5dfb9reuses recognized Grok source identities across retries and reads the validated native notification ID when the summary is unavailable on the first transcript import. The fixture covers recovery from a prior metadata-only import, one response with restored model, and health returning to 0. 148 targeted tests andversionctl release-check --jsonpassed. On a read-only ledger copy, text and JSON exited 4 at the default one-hour threshold. Exact output.Twelfth review fixes
Head
4584bd9e6a844e7a34dee16c5d077953a9eba529defers Grok transcript import when a summary read fails and the source and transcript provide no known native identity. The regression reproduces the duplicate session on the prior head and confirms both records import under one identity after recovery. 149 targeted tests and the release check passed. Text and JSON exited 4 at the default one-hour interval on a read-only copy of bestia's ledger. Exact output.Thirteenth review fixes
Head
af16e49b6f1c6a6eb61218e007957021cd3f3892waits for a Grok native ID when the first transcript has no ID and the summary is missing, empty, or unreadable. The fixture exercises all three conditions and confirms recovery under one identity. 149 targeted tests and the release check passed. Text and JSON exited 4 on a read-only ledger copy at a 120-second interval. Exact output.Fourteenth review fixes
Head
b120a9da5baac4a3bee6339f081e0531ecd1bf8faccepts a valid native identity from a Grok event when summary and update identity are unavailable. An initial stream with no validated ID waits for identity evidence. 163 targeted tests and the release check passed. Text and JSON exited 4 on a read-only ledger copy at a 120-second interval. Exact output.Fifteenth review fixes
Head
6954eb0ae9d4ca28d81563c610ada0366ef266earestores directory fallback for readable Grok metadata without an ID, gives a validated summary ID precedence, and rejects identity from malformed update envelopes. As on base, a later explicit ID applies to newly imported records and earlier records keep their historical keys. 164 targeted tests and the release check passed. Text and JSON exited 4 on a read-only ledger copy at a 120-second interval. Exact output.Sixteenth review fixes
Head
0e79f00b1452d2a4ccf4c8e8fcd590e0120d2c28uses turn-start event IDs and validated completed updates as Grok identity evidence. Its regression covers malformed tool updates, unknown kinds and missing update payloads. 164 targeted tests and the release check passed. Text and JSON exited 4 on a read-only ledger copy at a 120-second interval. Exact output.Seventeenth review fixes
Head
a660c3b13f7ef68c34a3c15c09c36be7521aa45evalidates Grok tool notification IDs using the same check as transcript ingestion. A valid tool call supplies native identity during a summary failure, while malformed tool calls cannot supply it. 165 targeted tests and the release check passed. Text and JSON exited 4 on a read-only ledger copy at a 120-second interval. Exact output.Eighteenth review fixes
Head
8336bc2e67fec498a547280e38b184a2f733d527imports valid Grok user and assistant messages when their notification is the only source of native identity. The fixture verifies both rows are attached to the native session and the summary error is reported. 166 targeted tests and the release check passed. Exact output on a read-only ledger copy.Nineteenth review fixes
Head
cd6b4935ac403146078f9bcf9d4f21d44a1ad0e2uses importer-recognized Grok compaction and extension updates as native identity evidence. The fixtures verify both events land and the summary error remains visible. 167 targeted tests and the release check passed. Exact output on a read-only ledger copy.Twentieth review fixes
Head
843de0efa32d45f59c394ecc8312ac1099922bb2lets Router sync continue through an optional timestamp probe failure. SQLite still controls import success, while unchanged rows keep their previous import timestamp if the probe failed. All 83 targeted tests and the release check passed. Exact output on a read-only ledger copy.Twenty-first review fixes
Head
d6f41d60a73a022fffd31229a499b2a98d001e2ckeeps native paths out of freshness scan errors and retains the unavailable status and exit code. 106 targeted tests and the release check passed. Exact output on a read-only ledger copy.Twenty-second review fixes
Head
0f6252fe84400bb4cb69b30a24874812a23466fekeeps ledger permission errors path-free and validates native timestamps before either output format renders them. 108 targeted tests and the release check passed. A read-only ledger copy produced exit 4 in text and JSON, with four stale harnesses and zero invisible sessions. Exact output.Twenty-third review fixes
Head
71bdd488cdece0f9b925d6ad290c92b3a195ea11validates Grok's transcript and metadata timestamps before comparing them. It detects malformed OpenCode timestamps during freshness discovery and preserves the process visibility report. The two reported regressions failed on the prior head and passed here. All 50 health tests and the release check passed. Exact output on a read-only ledger copy.Twenty-fourth review fixes
Head
4a185b06d1f41e859b5203e6af1cfef8bed08d45includes OpenCode message and part creation timestamps when checking freshness. A malformed timestamp cannot obscure a valid session in the separate process visibility check. Both regressions failed on the prior head and passed here. All 52 health tests and release validation passed. Exact output on a read-only ledger copy.Current head and proof
Head
a71c37599888d8da2aa9170d69bed87b2fbaa084keeps both output formats working when OpenCode's visibility query fails. The two reproduced cases use a creation-only schema and a corrupt native database. All 53 health tests and release validation passed locally. Independent review passed at this head with no blocking findings, and all 1,004 tests and GitHub proof passed. Exact stale-ledger output.Elon record
Requirements and who asked The user asked for health to show when Observer is behind actual sessions. #149 specifies per-harness times, source counts, configurable failure, JSON, and visibility preservation.
Deleted A daemon, scheduling changes, cross-machine transport, and a new ledger table. Health can compare existing native metadata with the ledger's import timestamps.
Bottleneck Health only checked running-session visibility, so a failed sync could go undetected while native records accumulated.
Checked myself Reproduced the stale and never-synced false successes with fixtures, ran the health and bare-root tests, and confirmed the CLI behavior against a real SQLite backup.