Skip to content

Revive observe observability primitive (#81)#142

Merged
loning merged 1 commit into
devfrom
feat/observe-primitive
Jun 20, 2026
Merged

Revive observe observability primitive (#81)#142
loning merged 1 commit into
devfrom
feat/observe-primitive

Conversation

@loning

@loning loning commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Revive the observe observability primitive (#81)

#81 (the generic observe --json CLI dumping per-entity timeline + queue/DLQ state from the redb durable store) was auto-implemented on a devloop branch, but its PR #84 was CLOSED/reaped when the parent issue was driven to blocked by a fix-loop timeout (~28h) — not a merit rejection. The primitive never landed in dev, so fkst-framework observe --json (and scripts/run.sh health / the local board) are currently broken ("unknown subcommand: observe").

This integrates the primitive (commits f39800a + ceb6d48) onto current dev:

  • crates/fkst-framework/src/observe.rs — the observe subcommand
  • src/supervise/delivery_store.rs — the snapshot reader, merged with current dev's schema-v9 delivery store (redrive, terminal dead-letter suppression, compaction) preserved
  • src/supervise/observe_server.rs — live observe socket for a running supervise
  • crates/fkst-common/src/durable_layout.rs, src/main.rs, src/supervise/mod.rs

Output contract (stable)

fkst-framework observe --durable-root <root> --jsonDeliveryObserveSnapshot:
{ schema_version:1, generated_at_ms, source{...}, limits{...}, truncated{deliveries,dead_letters}, queues[{queue,depth,pending,in_flight,retrying,oldest_pending_age_ms}], deliveries[...], dead_letters[...] }

Verification

  • cargo build -p fkst-framework
  • cargo test -p fkst-framework observe ✓ ; delivery_store tests 54/0 ✓
  • cargo fmt --all --check
  • Real smoke: built a delivery.redb and ran observe --durable-root <root> --json → emits schema_version:1 + the full contract.

Why now

A downstream packages feature (idle-detector + archaudit: idle-triggered read-only architecture audit) depends on this observe contract. It is implemented and CI-green against this exact shape but fail-closed-inert until observe is back in dev.

🤖 Generated with Claude Code

⟦AI:FKST⟧

Port the issue #81 observe primitive onto current dev while preserving the current schema v9 delivery store behavior, terminal dead suppression, redrive logic, and verify.sh environment handling.

Includes offline redb snapshot reads plus the transient live observe socket for supervise-owned redb handles from ceb6d48.

Verification: cargo fmt --all; cargo build -p fkst-framework; cargo test -p fkst-framework observe; cargo test -p fkst-framework delivery_store; real observe --json smoke against a generated durable store.

⟦AI:FKST⟧
@loning loning merged commit 996bdaa into dev Jun 20, 2026
4 checks passed
@loning loning deleted the feat/observe-primitive branch June 20, 2026 04:44
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