hermes-agent/evals/gateway_failure_ownership/foreign_writer.py
Teknium 3114916ee4 fix(gateway): carry accepted-input ownership through persistence
Namespace delivery markers and assign fresh keyless turn identities instead
of inferring ownership from IDs or process-local row baselines. Query only
marker existence on the canonical live compression continuation and ancestors.
Preserve raw reply IDs and exclude metadata from provider wire messages.

Expand the two existing invariants with resumed cross-chat ID collisions,
a real independent SQLite writer, reaped siblings, and archived-history
allocation controls. All 20 full-handler checkpoints and 63 targeted tests pass.
2026-09-07 14:11:18 -07:00

13 lines
421 B
Python

"""Independent durable writer used only by the loopback ownership probe."""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(sys.argv[1]).resolve()))
from hermes_state import SessionDB
db = SessionDB(db_path=Path(sys.argv[2]))
db.append_message(
sys.argv[3], "user", "foreign independent input", observed=False,
display_metadata={"gateway_input_owner": "independent-process-owner"},
)
db.close()