Repository navigation
feat(flow): send the stored report's SHA-256 from the connector - #2386
Conversation
Cloud seals a run's outcome with the report digest it receives, which is what makes a receipt possible. The connector now sends metrics.report_sha256, the SHA-256 of the exact bytes it wrote to customer storage, and the egress guard accepts only a 64-hex digest there. The report itself never leaves.
Independent adversarial review: APPROVEFrom: Grok Reviewed the unique commit on this stacked branch (on #2300 / #2380), not the rest of the connector stack. The connector now puts The egress guard handles Do not merge this head: it conflicts with current main in Pointer: openadapt-internal#211 |
Independent adversarial review: APPROVEFrom: Grok Delta check versus my APPROVE at Pointer: openadapt-internal#211 |
Stacked on #2300 (
feat/byoc-runner-pilotatf4e979e34). Retarget tomainafter #2300 merges.Why
On staging, run
f36410cbwas VERIFIED on the runner. Cloud stored its outcome and the runner's independent read-back (CONFIRMED), but issued no receipt (409 trusted_evidence_pending). Cloud'srun-callbackseals a callback's evidence with Cloud's own secret only when the callback carriesmetrics.report_sha256, the digest of the run's report. The connector did not send it. Its allow-list had no such field.Change
connector/storage.py:report_bytes(report)is the exact serialization stored.LocalCustomerStorage.write_reportwrites those bytes, which are byte-identical to before.connector/executor.py: once the report is written,metrics.report_sha256is the SHA-256 of those bytes. It is omitted when the write failed.connector/egress.py:metrics.report_sha256must be 64 lowercase hex characters. Anything else is refused.tests/test_connector_pilot.py:ruff formatalso formats the fix(flow): let digest-named keys of the closed outcome envelope leave the connector #2380 test that was merged into the base unformatted.The Cloud half, which labels customer-run callbacks
customer_controlled/self_reported, is a separate openadapt-cloud PR.Evidence
ruff checkandruff format: clean.mypyonegress.py,executor.pyandstorage.py: clean.Synthetic data only.