Skip to content

Address human-gate (#14) review follow-ups - #15

Merged
pdettori merged 1 commit into
mainfrom
chore/human-gate-followups
Jun 28, 2026
Merged

pdettori merged 1 commit into
mainfrom
chore/human-gate-followups

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Non-blocking cleanups flagged by the final whole-branch review of the human-gate feature (#14). No behavior change to any runtime path; pure accuracy/readability/test-coverage improvements.

  • leaf-job-runner: processOne now returns accurate paused/aborted labels instead of collapsing them to "failed". The label is log/metrics-only (the drain loop branches only on idle/retry), and ack behavior is unchanged — but the old label was misleading. +2 unit tests.
  • gate-marker: readGateMarker now shape-validates (status is awaiting_approval, sessionId/ts strings, gateId number, gate.summary/gate.proposed_action strings) and returns null on off-shape input, matching readDecision's discipline. +1 unit test.
  • run-leaf: restored the cwd / LLM-gateway / durable-session / verdict-fast-path invariant comments in realProduceVerdict that were condensed away during the gate front-end rewrite (readability only).
  • request-approval-tool: added the empty-proposed_action rejection test (was only covering empty summary).

Verification

@sh/harness 119 passed (2 skipped), @sh/knative-server 29 passed, typecheck clean.

Assisted-By: Claude Code

Three non-blocking items from the final whole-branch review:
- leaf-job-runner: processOne returns accurate paused/aborted labels
  instead of collapsing them to "failed" (label is log/metrics-only;
  ack behavior unchanged). +2 tests.
- gate-marker: readGateMarker now shape-validates (status, sessionId,
  gateId, ts, gate.summary/proposed_action) and returns null on
  off-shape input, matching readDecision's discipline. +1 test.
- run-leaf: restored the dropped cwd / LLM-gateway / durable-session /
  fast-path invariant comments in realProduceVerdict (readability).
- request-approval-tool: added the empty-proposed_action rejection
  test (was only covering empty summary).

Harness 119 passed (2 skipped), knative-server 29, typecheck clean.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review (LGTM)

Clean follow-up to PR #14 (human-gate). Adds shape validation to readGateMarker, makes processOne return accurate terminal-state labels for logging/metrics, restores invariant comments in realProduceVerdict, and adds the missing proposed_action rejection test. No behavior changes; +4 unit tests.

All commits signed-off, CI green, no security concerns.

@pdettori
pdettori merged commit d30fd16 into main Jun 28, 2026
1 check passed
@pdettori
pdettori deleted the chore/human-gate-followups branch June 28, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant