mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-15 16:42:15 +00:00
ad97ae890d
68e557e9fmoved the Docker agent's JSON-marshal hook from a package global to a per-Agent field, which touches internal/dockeragent/agent.go and internal/dockeragent/container_update.go. It meant to take the Contract-Neutral bypass, but a blank line separated the trailer from Co-Authored-By, so git's trailer parser dropped it, CI ran the completion guard without a reason, and Canonical Governance went red on three counts: missing contract docs/release-control/v6/internal/subsystems/agent-lifecycle.md, missing verification artifact for "agent runtime transport trust proof", and missing verification artifact for "Docker container recreate, rollback, durable result, and live network-mode proof". The sibling timer-hook commit8e5ef365dhas the same defect, so this backfill covers both seams. Document the seams in the agent-lifecycle contract's Current State: both newTimerFn and jsonMarshalFn are unexported Agent fields reached through the newTimer and jsonMarshal methods, nil falls back to time.NewTimer and json.Marshal, no package-level hook global remains in internal/dockeragent, and injection happens at construction only so the fields need no mutex. The seams stay internal — no enrollment, transport trust, command admission, acknowledgement, or recreate/rollback semantics move, and they must not be promoted into NewAgent options or any server-facing surface. Pin that shape in the two registered verification artifacts. agent_internal_test.go asserts the field names, types, and unexported-ness, parses every non-test source in the package to fail if either hook returns as a package-level var, proves the nil defaults run the standard library, drives two Agents with different hooks concurrently so the isolation is checked under -race, and proves sendCommandAck marshals through the receiver's own seam. container_update_test.go proves decodeUpdateContainerPayload routes through a.jsonMarshal, that an injected failure never reaches a sibling Agent, and pins the method form at compile time. Guard dry-run over the staged set passes with no Contract-Neutral bypass, and replaying 68e557e9f's file list plus these three files is green, so the original commit would have passed had it carried them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>