Repository navigation
[PORT-004][RFC][P0 before host-attested use] Implement the dedicated suite host in read-only shadow mode #17
Description
Decision requested
Approve an implementation plan for the dedicated suite host selected by #9 and ADR 0001. This issue specifies the first safe slice: a separate process/package running in read-only shadow mode. It does not authorize creating a repository, publishing a package, or enabling outbound writes.
Why this is P0 before host-attested use
table-kit currently publishes table.event/1.0 and table.evaluation/1.0, and the four tools have installed-package conformance gates (#7, #8; PRs #11–#15). Those contracts correctly label current evidence self_attested. No existing tool can truthfully mint host_attested results because no independent principal owns the protected session descriptor, durable source cursors, evaluator execution, and result commit.
MVP boundary
The host MUST run under a service/OS identity distinct from adapters and evaluators and MUST own:
- protected session descriptors and immutable descriptor digests;
- append-only canonical TableEvent storage;
- per-source durable cursors and replay/idempotency records;
- evaluator configuration/policy digests and invocation records;
- committed EvaluationResult envelopes and audit metadata;
- export/deletion/retention state.
Adapters may submit observations and source-native IDs but may not advance canonical cursors. Evaluators may read a bounded event snapshot and return a candidate result but may not attest or commit it. The shadow MVP receives no Discord/VTT post credential and exposes no write-to-table capability.
Protected session descriptor
Define and version a machine-readable descriptor containing at minimum:
- campaign ID, session ID, creation/close timestamps;
- roster, normalized principals, roles, and source-identity bindings;
- system/edition and canonical source-set selection;
- enabled evaluators, versions, policy/config digests;
- consent, visibility, retention, export, and deletion policy;
- source instances and required event families;
- descriptor version, digest, and supersession lineage.
Changes create a new digest and explicit supersession record; they never rewrite prior evidence authority.
Ingestion and commit protocol
- Adapter submits a page with source instance, source-native IDs, prior cursor, ordering evidence, and TableEvents.
- Host validates schema, descriptor binding, identity, contiguity, duplicate/replay semantics, and required redaction metadata.
- Host atomically commits accepted events and the next cursor. Any gap, fork, malformed row, or partial write leaves the prior cursor authoritative and records a typed refusal.
- Host invokes each evaluator against an immutable event range plus descriptor/config/policy digests.
- Host validates semantic invariants, evidence references, coverage, and evaluator identity before committing the result.
authority_status=host_attestedis allowed only when the committed envelope carries the host binding required bytable.evaluation/1.0; otherwise it remainsself_attestedorunknown.
Recovery and lifecycle requirements
- exactly-once effects over at-least-once delivery;
- deterministic replay and byte-stable result reproduction for the same inputs;
- crash recovery before/after event write, cursor commit, evaluator return, and result commit;
- explicit rotate/truncate/fork/source-reset handling; never infer continuity;
- restart-safe session open/close and late-event behavior;
- correction and human-ruling events remain distinct from machine findings;
- consent withdrawal, scoped export, retention expiry, and deletion produce auditable tombstone/control records without silently rewriting prior outputs.
Minimum operator/agent surface
The implementation MAY choose CLI, local API, or both, but must provide typed, machine-readable operations equivalent to:
- initialize host storage;
- create/read/supersede/close a session descriptor;
- ingest and query source progress;
- request evaluation and read committed results;
- export/delete according to descriptor policy;
- inspect health and recovery state.
Human prose must be additive; an AI agent must not have to parse logs to know success, refusal, incompleteness, or next action.
Acceptance criteria
- Architecture records the process/package and repository decision without making table-kit the trusted host.
- Descriptor schema, canonical digest rules, and compatibility policy are reviewed.
- Capability matrix proves adapters/evaluators cannot mint attestation or advance canonical state.
- One table-kit stream and dmcheck evaluation complete end to end in shadow mode.
- CharacterCheck and SRDCheck candidates are accepted through the same generic evaluator boundary.
- Gaps, duplicates, replay, forks, malformed/redacted required content, mixed sessions, unknown event types, and evaluator failure all fail closed.
- Kill-point tests cover event/cursor/result atomicity and restart recovery.
- Credential-isolation test proves the shadow host cannot post to a table.
- Descriptor forgery, evaluator impersonation, cursor rollback, result replay, and storage tamper tests cannot yield
host_attestedoutput. - Export/deletion/retention and consent transitions have deterministic tests.
- Installed-artifact four-tool conformance remains green.
- The pilot in the companion UXR issue can run without privileged manual database edits.
Explicit non-goals for this issue
- outbound Discord/VTT posting;
- autonomous DM rulings or changes to game state;
- public package release;
- choosing a repository/package name before approval;
- claiming production readiness from synthetic fixtures alone.
Dependencies and closure
Depends on #7, #8, and #9. Close only when an independently protected implementation passes the adversarial acceptance suite and produces a valid host-bound shadow result. Contract publication or another in-process adapter is not sufficient.
Activity
chaoz23 commentedon Aug 3, 2026
Implementation location is now established at https://github.com/chaoz23/table-host.
Foundation commit
d7f84b6e87754ec27d52518f6c17d9aaae3f35adrecords the dedicated-boundary ADR and security posture, exposes a versioned agent-readable capability contract, and enforces that the scaffold is non-operational, shadow-only, cannot minthost_attested, and has no outbound writes. Exact hosted run 30838331895 passes Python 3.10 and 3.14.This satisfies repository/package placement only. The issue remains open. The next acceptance slice is the protected session descriptor plus canonical digest; storage, cursors, evaluation commits, isolation, adversarial tests, pilot evidence, and any release remain unimplemented and unauthorized.
chaoz23 commentedon Aug 3, 2026
First implementation slice is ready in chaoz23/table-host#1 at
3685788.It packages
table.session-descriptor/1.0, validates strict UTF-8/NFC integer-only JSON and cross-field identity/source/evaluator/consent/retention/visibility rules, computes a golden canonical SHA-256 digest, and exposes typed agent CLI success/refusal output. Adversarial tests cover duplicate keys, floats/NaN, unknown fields, ordering/coverage gaps, identity ambiguity, incomplete or late consent, DM visibility, raw-prose retention, lifecycle, and lineage digests.Local Python 3.10/3.12/3.14 suites pass 38 tests; wheel/cold-install/package-data checks pass. Hosted push run 30859071316 and PR run 30859111941 are green on Python 3.10 and 3.14. PR #1 is ready but not merged.
This advances the protected descriptor contract only. Results remain
self_attested; transactional protected storage, descriptor supersession commits, separate runtime principal, events/cursors/evaluations, adversarial process isolation, pilot evidence, and any release remain open.chaoz23 commentedon Aug 3, 2026
Descriptor PR chaoz23/table-host#1 merged as
4392589dd1d01c790d4dc58a4f7a70f0a5081cf4; exact post-merge run 30859456490 is green.The next slice is ready in chaoz23/table-host#2 at
2880eb4. It adds a private, versioned SQLite store that atomically appends canonical descriptors, compare-and-swaps one active campaign/session head, and appends audit metadata. Current-descriptor replay is idempotent; supersession requires the exact active digest. Status reads revalidate schema/triggers, every canonical descriptor/digest/generation/predecessor, and the audit chain.The 58-test suite passes locally on Python 3.10/3.12/3.14 and in hosted push/PR runs 30859969034/30859990271. It covers concurrent siblings (one winner), injected crashes after insert/head update/before commit (no partial effects), stale rollback, permissions/ownership/symlink/hard-link checks, schema drift, descriptor/audit tamper, and cold-installed CLI operation.
PR #2 is ready but unmerged. This is still same-principal, local, and
self_attested; canonical TableEvent ingest, atomic source cursors, evaluator/result commits, service identity isolation, external attestation, pilot evidence, outbound writes, and release remain open.chaoz23 commentedon Aug 4, 2026
table-host progress update:
924ece004d57261463b4acf60f08bd6099cf3443; exact post-merge run 30869489657 passed.59ea656implements the next RFC slice: canonicaltable.event/1.0page ingestion plus atomic per-source and canonical-session cursor commits.a7b8a2857a459b45dda6df5302d3760e6265888dand verifies the canonical schema digest; no schema copy was forked into table-host.The slice remains read-only and
self_attested: no evaluator execution/result commit, outbound writes, credentials, release, orhost_attestedclaim.chaoz23 commentedon Aug 4, 2026
Follow-up: table-host PR #3 is now ready, clean, and mergeable at exact head 59ea6565c9c8b97bfda1facba146a21e81fa5a43. Hosted push run 30870604081 and PR run 30870633442 both pass Python 3.10/3.14 and exact table-kit cold-wheel conformance.