Commit Graph
6 Commits
Author SHA1 Message Date
Nirav PatelandClaude Fable 5 2bc7d510c1 intake: assign kanban tasks to the default profile so the dispatcher claims them
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 15:04:10 -04:00
Nirav PatelandClaude Fable 5 827b816eeb intake review fixes: idempotent ledger add, inclusive ms checkpoint, FIFO promotion
- ledger_add_for_post adopts an existing open item carrying post:<id>
  before adding (crash between add and state save no longer duplicates)
- intake window is now inclusive (ts >= cp, init cp = newest+1) with the
  post-id map as the dedupe, so same-millisecond posts can't be lost to a
  crash between them
- newcomers can't jump the queued backlog: loop order is track -> promote
  -> ingest, and ingest queues when a backlog exists even if a slot is free
- documented the kanban --idempotency-key crash-recovery contract

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 15:03:19 -04:00
Nirav PatelandClaude Fable 5 54b705b073 v1 intake: Pulse posts become ledger items + dispatched kanban tasks
- new top-level non-bridge posts in the activity channel -> shre-items
  pipeline item (tag pulse-intake) + hermes kanban task (idempotency-key
  pulse-<post id>, created-by pulse-bridge) + ack comment
- outbound dedupe: ledger->post map seeded with the user's post id before
  the op:add hits the feed, so the mirror adopts the post
- status tracking via one 'kanban list --json' per poll: running/blocked/
  done comments on the post, ledger stage build -> done
- cap 3 concurrent intake tasks; overflow queued with a comment and
  promoted when slots free; intake state in the same atomic state.json
- first intake run only sets the checkpoint (no history ingestion)

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 15:00:35 -04:00
Nirav PatelandClaude Fable 5 e005931cb5 codex review fixes: duplicate-post recovery, fsync, fatal corrupt state, narrower comment drop
- create_post: on HTTPError, look for an existing post tagged ledger:<id>
  (insert-then-error recovery) and adopt it before retrying
- save_state: fsync tmp file before rename
- load_state: corrupt state is fatal (auto-reseed would duplicate every
  open item's post)
- comment: drop only on 500/404/410; 401/403/429/502/503 retry next poll

Accepted as-is (with rationale): same-second ordering relies on the feed
replaying the JSONL in append order + Python's stable sort; seed-window
add+close races reduce to the documented 'predates bridge' skip.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 14:47:34 -04:00
Nirav PatelandClaude Fable 5 1a3ab878b4 harden against mib007 mention-path 500 (insert-then-error)
Smoke test found: any @handle in a comms message 500s AFTER the row is
inserted (agents.url_key column missing on this instance), so a retry
duplicates the message. Neutralise ALL '@' the bridge emits (incl. its
own @nir escalation, zwsp renders identically) and make comment HTTP
errors non-retryable best-effort drops; posts still retry.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 14:45:19 -04:00
Nirav PatelandClaude Fable 5 9a862bee2b pulse-bridge v0: mirror shre-items ledger into Pulse (mib007 comms) posts
- daemon polls shre-items feed every 30s with inclusive-window (id,op,at) dedupe
- op:add -> post in 'activity' channel; op:update -> threaded comment
  (stage/kind/attempt/note, needs-you escalation mentions @nir);
  op:close -> done/dropped comment
- first run seeds currently-open items only
- state (checkpoint + ledger->post map) atomic at ~/.shre/pulse-bridge/state.json
- launchd ai.shre.pulse-bridge (KeepAlive, logs to bridge.log)
- '@' in ledger-derived text neutralised (zwsp) so comms agent-mention
  regex can never fire an AI reply from item content

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YECpkAwQUwgu7NVy91R8fW
2026-08-22 14:41:31 -04:00