Sensor conformance kit: capture validator, fake engine, honesty checklist - #2
Merged
Merged
Conversation
…list Builder-facing test tooling so sensor authors catch the silent-emptiness failure classes at build time instead of in production: - tools/check-capture.mjs — validates capture bodies/files against SPEC.md: rejects nothing-would-land captures, errors on malformed event time, warns on missing emitted_at (ingest-time stamping), missing/unstable thread_id, missing source_kind, malformed location, and wrong drop-file suffix. - tools/fake-engine.mjs — a local test double serving both doors (POST /intake/capture + --watch drop-file folder). Demonstrates the SPEC §4 semantics honestly: 401 that names a rejected token (never 'unreachable'), 400 on empty captures, per-thread content dedup on re-send (turns_landed vs turns_deduped), partial-write guidance. - SENSOR-CHECKLIST.md — the five honesty rules (event time; cursor advances only after acked writes and caps must resume; say every skip out loud; 401 is not an outage; re-send whole threads and read the counts) + a troubleshooting table. Zero dependencies, zero engine code — everything derives from SPEC.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejbYvWjhjfx8nrasS8p7D
RegardsKiki2
marked this pull request as ready for review
July 21, 2026 15:12
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.
Builder-facing test tooling so sensor authors catch the silent-emptiness failure classes at build time, without ever needing a Bevia engine — everything derives from SPEC.md; zero dependencies, zero engine code.
What's in it
tools/check-capture.mjs— validates capture bodies/files against the spec. Rejects captures where nothing would land; errors on malformed event time; warns on missingemitted_at(ingest-time stamping), missing/unstablethread_id, missingsource_kind, malformedlocation, and wrong drop-file suffix.tools/fake-engine.mjs— a local test double serving both doors (POST /intake/capture+--watchdrop-folder). Honest responses: 401 that names a rejected token (never "unreachable"), 400 on empty captures with reasons, per-thread content dedup on re-send (turns_landedvsturns_deduped), partial-write guidance for drop files.SENSOR-CHECKLIST.md— the five honesty rules (event time on every turn; cursor advances only after acked writes and caps must resume; say every skip out loud; a 401 is not an outage; re-send whole threads and read the counts) plus a "my data isn't landing" troubleshooting table.Verified
examples/files and correctly REJECTs an all-empty capture.turns_landed: 3; re-send →turns_deduped: 3; empty capture → 400 with the named reason.🤖 Generated with Claude Code
https://claude.ai/code/session_013ejbYvWjhjfx8nrasS8p7D
Generated by Claude Code