fix(transport): UTC-stable hash + derive hop reset (live round-trip proof) - #29
Open
cryptoxdog wants to merge 2 commits into
Open
fix(transport): UTC-stable hash + derive hop reset (live round-trip proof)#29cryptoxdog wants to merge 2 commits into
cryptoxdog wants to merge 2 commits into
Conversation
…integrity Local-TZ datetime canonicalize made transport_hash host-dependent (macOS vs container UTC), and derive() carried parent hop_trace entries that failed client hop validation after real CEG/EIE round-trips. Document LIVE_TRANSPORT_ROUNDTRIP_PASS evidence (no stubs). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Constellation Node SDK’s transport contract implementation to eliminate host-dependent transport_hash differences caused by timezone handling, and to align derive() semantics with hop-trace validation rules by ensuring derived packets do not inherit parent hop observations.
Changes:
- Canonicalize all datetime hash material to UTC (
...Z), treating naive datetimes as UTC to keeptransport_hashhost-invariant. - Change
TransportPacket.derive()to resethop_trace(only optionally including a single new hop), relying onlineageto represent parentage. - Add/adjust unit tests and contract/spec documentation, plus include a live round-trip evidence report.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/transport/test_lineage.py | Adds coverage ensuring derive() resets hop_trace and the child remains hop-trace-valid. |
| tests/transport/test_hashing.py | Adds coverage for UTC-stable datetime canonicalization and packet round-trip integrity. |
| tests/runtime/test_execution.py | Updates expectations to match new derive() hop-trace reset behavior in runtime execution flow. |
| src/constellation_node_sdk/transport/packet.py | Implements derive() behavior change to reset hop_trace on child packets. |
| src/constellation_node_sdk/transport/hashing.py | Makes datetime canonicalization always UTC and host-invariant for hashing. |
| reports/TASK-046-live-transport-roundtrip.md | Adds human-readable live round-trip evidence and explanation of defects addressed. |
| reports/TASK-046-live-transport-roundtrip.json | Adds machine-readable evidence artifact for the live round-trip proof. |
| contracts/TRANSPORT_PACKET_SPEC.md | Documents UTC datetime hashing rule and derive() hop-trace reset semantics. |
| .gitignore | Ignores /WIP/ directory for local work-in-progress artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.



Summary
transport_hashhost-dependence: datetime canonicalize always uses UTC/Z(was local TZ → macOS EDT ≠ Docker UTC → CEG/EIE400 transport_hash does not match packet).derive()to resethop_trace(parent hops keep parentpacket_id; lineage owns parentage). Unblocks GateClient inbound hop validation after real worker responses.LIVE_TRANSPORT_ROUNDTRIP_PASSevidence (no stubs): Gate:9000→ CEG:8000(ceg-real) → EIE:8001(enrichment-engine).Proof
PLASTICOS_GATE_LIVE_URL=http://127.0.0.1:9000→pytest tests/integration/test_gate_external_authority_e2e.py→ 3 passedreports/TASK-046-live-transport-roundtrip.md+.jsonsha256:819de0dde2e1ad66ef0fa0f00a48350f7d8351c405def83c50aa093cde7302359101/9102freeceg-real/enrichment-engineHonest non-claims
LIVE_INTEGRATION_PASS/PROMOTION_APPROVEDValidationError(sparse graph / no candidate); converge returnedValueError— transport + hop integrity still validRepo boundary
/tmponly)Gate A
Test plan
pytest tests/transport/test_hashing.py tests/transport/test_lineage.py tests/runtime/test_execution.pymake prPASS on clean worktree:8000/:8001(documented in reports/)Made with Cursor