Repository navigation
Tl 08 inbound - #22
Merged
Merged
Conversation
- inbound.ts: one ingest path for live and replay; replays never reply - extract.ts: deterministic runtime extraction (range, bounds, % -> clarify, none -> review) - tests: H17 fixture text -> 30/60, phone % -> needs_clarification, no runtime -> needs_review with no reply, unenrolled sender ignored, replay twice -> one effective ingest and zero replies - stdb.ts: subscription onError takes one ctx arg; reject with ctx.event Co-Authored-By: Claude Opus 5.5 <[email protected]>
… extraction keeps upper bounds and ignores elapsed durations
Durations are judged by their own clause (split on but/however/although/ while/;/,/and the|my). Phone, laptop and other personal-device clauses are dropped; equipment runtime stated as unknown, or device-only numbers, now return needs_clarification with runtime unset. The "recorded ... of backup" receipt is only sent for kind "runtime"; clarification asks what the equipment's (e.g. oxygen concentrator's) battery display shows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
processOutbox acts only on the current bridge_outbox snapshot and sends only the newest jobVersion per jobId. Lower versions and failed intents that left the view are marked obsolete for good. A failed ETA is retried at most 3 times and never later than 2 minutes after its first attempt; after that it is marked expired and logged for reconciliation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The bridge cannot read job status, and bridge_outbox still returns rows for jobs that have moved on, so a retried ETA could arrive after delivery. A refused send is now recorded as needs_reconciliation, logged once (key only, no numbers) and never resent. Legacy "failed" records are treated the same. Newest-version, vanished-row and accepted-never- resent behavior is unchanged. README explains why. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL-08 (part 1): Live Photon check-ins → SpacetimeDB
What it does
npm run live: polls Photon for messages from the enrolled test sender, binds them to H17 (BRIDGE_SENDER_HOUSEHOLD), extracts equipment runtime and calls A'singestCheckin. Resumes from a saved cursor; dedupes by provider message ID.npm run replay -- fixtures/h17-checkin.json: same ingest path, clearly labeled REPLAY, never sends messages.extract.ts: deterministic runtime extraction (ranges, single values, hours). A phone battery % alone → clarification question; nothing usable → review, runtime unset.Tests: 32/32 pass, covering extraction cases, H17 text → 30–60 min, unenrolled sender ignored, replay twice → one effective ingest and no replies.
Setup: run
npm installat repo root as well (stdb.ts uses rootspacetimedb+src/module_bindings), start local SpacetimeDB per SETUP.md, fill the newBRIDGE_*andSPACETIMEDB_*vars from.env.example.Not yet (part 2, after TL-05): send confirmed ETA from the committed job; delivery status tracking/reconciliation.
Part of TL-08