Skip to content

Promote the No-Origin Guard, Docker Test Reader, and Handoff Prompt Fixes to Main - #3299

Merged
ptr727 merged 5 commits into
mainfrom
develop
Oct 21, 2026
Merged

ptr727 merged 5 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes these pull requests from develop.

  • #3297: the write guard fails closed on an unread write target when no origin resolves.
  • #3296: fixes and pins the Docker task workflow test reader's known limits.
  • #3295: corrects the smoke stub's enable_* description in the caller-stub paragraph.
  • #3293: carries a command the user must run inside the prompt's own question.
  • #3291: matches session-handoff's platform-lane exception to the fix-and-verify rule.

Closes #3288
Closes #3280
Closes #3282
Closes #3284
Closes #3275

🤖 Generated with Claude Code

ptr727 and others added 5 commits October 20, 2026 18:00
… Rule (#3291)

## Summary

`session-handoff` "The Chain" states that a platform lane takes an issue
only when no Linux host outside WSL can both fix the issue and verify
the fix. The exception after it named verifying alone, and its "where"
could be read as describing the backlog rather than as a condition.

The exception now states the same condition as the rule: such a defect
goes to the backlog when a Linux host outside WSL can both fix it and
verify the fix. The path-translation example is its own sentence and
names where the fix is made and tested, so it reads as one instance of
that condition.

The generated copies under `.claude-plugin/` and `.github/skills/` are
regenerated with `scripts/build_dist.py`.

Closes on promotion: #3275

## Verification

- `scripts/build_dist.py --check`: distributions current.
- `scripts/prose_lint.py --diff origin/develop`, with and without
`--check sentence-length`: clean.
- markdownlint-cli2 over the three copies and `spec/validate.py`: clean.
- Three local strict review passes. The first raised a sentence-length
finding and the second raised an example that dropped the condition.
Both are fixed on this branch, and the third pass raised none.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

- **Documentation**
- Updated platform-lane guidance so issues are routed to the ordinary
backlog when a Linux host outside WSL can both fix and verify them.
  - Added a path-translation scenario as an example of this workflow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
…3293)

## Summary

`GOVERNANCE.md` "Communicating with the User" said where a clickable
link goes when an interactive prompt cannot render it, and said nothing
about a command the user has to paste and run. This adds a bullet beside
the link bullet, which stays as it is: a question asking the user to run
something carries the exact command in its own text, complete and ready
to paste, and never points at an earlier message for it, since a prompt
shows a command as plain text even though it cannot render a link.

The section is included whole by the `agent-conduct` and
`session-handoff` Skills, so their sources and generated distributions
are regenerated with `scripts/build_dist.py`.

## Verification

- `scripts/build_dist.py --check`, `scripts/prose_lint.py --diff` (with
and without `--check sentence-length`), `spec/validate.py`,
`scripts/repo_gate.py --check eol` and `--check eol-coverage`, and
`scripts/docker_lint.py` (markdownlint, editorconfig-checker) all pass.
- Three recorded `local-strict-review` passes at the `frontier` tier.
The first raised three findings (two over-long sentences, an ambiguous
pronoun, and wording that diverged from the issue), the second raised
one (an unhedged claim that conflicted with the link bullet), and the
third raised none. Each was fixed in its own commit.

Closes on promotion: #3284

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…graph (#3295)

Closes #3282

The caller-stub paragraph in docs/reusable-workflows.md said the smoke
job forwards the paths filter's enable_* outputs. The catalog smoke stub
passes its own fixed enable_* set, the same one its publish-release.yml
passes, and its `changes` paths filter only decides whether the smoke
job runs. The dispatch-bypass note now reads as guidance for a
multi-target caller that wires filter outputs into enable_* inputs.

WORKFLOW.md mentions a smoke-build enable-forward in several places and
is not changed here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## Summary

With no resolvable origin, the write guard now fails closed on a gh
write whose target it does not read. That covers a gh write an `eval`
runs, a `gh api` write to a `repositories/<id>` endpoint, and a `gh api`
write through a `..` segment. A literal target keeps the no-origin
allow, since there is no owner to compare it against. The run-time-word
check and the cross-owner comparison stay inside the origin branch.

## Changes

- `classify()` in `host-setup/agent-safety/claude/gh-write-guard.py`
calls `_gh_unread_target` after the `if origin:` block rather than
inside it. With an origin resolved, the check order and every decision
are unchanged. The comment above the block now states which checks need
an origin.
- A new `_NO_ORIGIN_CASES` table and `_no_origin_selftest()` run with
`_origin_owner_repo` pinned to resolve nothing. The pin is restored in a
`finally`. The table holds deny cases for each unread shape and allow
cases for a literal cross-owner target, a write naming no target, a
run-time `--repo`, and reads.
- `host-setup/agent-safety/README.md` requirement 3 and the "Opaque
targets are unseen" bullet in `host-setup/agent-safety/claude/README.md`
now state the no-origin posture: the owner comparison and the
run-time-word check are skipped, and an unread target still fails
closed.

## Scope Note for the Maintainer

`_gh_unread_target` also covers a write taking its repository from a
`GH_REPO` that an unread builtin sets, such as `declare -x`, `read`,
`set -a`, an `eval`, or `GH_REPO+=`. That shape moves with the call. So
outside a checkout, `declare -x GH_REPO=stranger/example; gh pr comment
5 -b x` is now denied, though the value is written out. This fits "an
unread target fails closed", since the hook does not read those
builtins. It may differ from what "literal targets keep the no-origin
allow" meant. The self-test pins the deny so either answer is a one-line
change.

## Verification

- `python3 host-setup/agent-safety/claude/gh-write-guard.py --selftest`:
SELFTEST PASS, including every new no-origin case.
- `python3 host-setup/agent-safety/claude/test_install.py`: OK.
- Revert proof: a scratch copy of this branch's guard with only the code
move undone (tests kept) fails exactly the four no-origin deny cases
(`eval`, `repositories/<id>`, `..` segment, `declare -x GH_REPO`), each
read as allow. The working tree was never reverted.
- Develop-versus-branch differential: develop's guard, loaded from `git
show origin/develop:...` into a fresh `mktemp -d`, and this branch's
guard classified the same constructed corpus under `timeout`. The corpus
is every command in the guard's `*_CASES` tables plus the no-origin
cases, classified with two resolved origins and with no origin. Every
flip is allow to deny, with no origin, through the unread-target deny
message. There are zero deny-to-allow flips and zero flips with an
origin resolved. The flipped forms are the `eval` write, the
`repositories/<id>` endpoint, the `..` segment, and the unread-builtin
`GH_REPO` shapes.
- Gates: `prose_lint.py --diff origin/develop` (with `--check
sentence-length` too), `repo_gate.py --check eol` and `eol-coverage`,
`docker_lint.py`, `spec/validate.py`, and `ruff check` plus `ruff format
--check`.
- Local strict review: three recorded passes. The first found
sentence-length lines, a closed rule list on line 158 of the claude
README, and an ambiguous pronoun, all fixed. The second found an
unreflowed docstring and a comment narrower than the code, both fixed.
The third found nothing.

The comment lines this change adds need the `comments` label.

Closes #3288

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary

Closes #3280

The stdlib-only reader in `tests/test_docker_task_workflow.py` now
closes the limits that need a small change and pins the rest.

Fixed, each with a case that fails on the old reader:
- A step whose first key is `run:` or `uses:`.
- Docker global options before the subcommand.
- A `with:` child indented deeper than ten spaces.
- `--push=false` and `--push=0` no longer count as a push.
- A `run` script ends at its first dedent, so a later `env:` value is
not read as script.

Pinned as known limits in `KnownLimitsCase`, each asserting the current
behavior: heredoc, quoted separator, and trailing comment pushes, a
`type=registry` cache source, folded and plain multi-line `run`, a
multi-line flow `with`, a block-scalar login value, an inverted
credential check, a check held in an echo, other missed push forms, and
`with: push: false`.

Two limits are listed in the header without a case: a bare `-` sequence
item and a shallow `run` body. The header lists every remaining limit.

No YAML dependency is added.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 21, 2026 02:16
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ca2ebd7-cb19-4510-beb3-8fb364485baf
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Only minor documentation nits remain; no blocking issues were identified.

No open issues 🎉

What changed in this PR

Promotes guard, Docker workflow-reader, documentation, and handoff guidance fixes to main.

Changes:

  • Fails closed on unread GitHub targets without an origin.
  • Expands Docker reader coverage and documents known limits.
  • Updates governance, workflow, and generated skill guidance.
File Summary
tests/​test_docker_task_workflow.py Docker reader fixes and limit tests
host-setup/​agent-safety/​README.md No-origin guard documentation
host-setup/​agent-safety/​claude/​README.md Opaque-target guidance
host-setup/​agent-safety/​claude/​gh-write-guard.py No-origin unread-target enforcement
GOVERNANCE.md Prompt command guidance
docs/​reusable-workflows.md Smoke input documentation
.github/​skills/​session-handoff/​SKILL.md Session-handoff guidance
.github/​skills/​agent-conduct/​SKILL.md Agent-conduct guidance
.claude-plugin/​fleet-skills/​skills/​session-handoff/​SKILL.md Generated session guidance
.claude-plugin/​fleet-skills/​skills/​agent-conduct/​SKILL.md Generated conduct guidance
.claude-plugin/​fleet-skills/​.source-digests/​session-handoff Source digest update
.claude-plugin/​fleet-skills/​.source-digests/​agent-conduct Source digest update
.agents/​skills/​session-handoff/​SKILL.md Canonical session guidance
.agents/​skills/​agent-conduct/​SKILL.md Canonical conduct guidance

Review effort: Lite

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.49%. Comparing base (412479b) to head (848d629).
⚠️ Report is 409 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3299   +/-   ##
=======================================
  Coverage   65.49%   65.49%           
=======================================
  Files          17       17           
  Lines       10011    10011           
=======================================
  Hits         6557     6557           
  Misses       3454     3454           
Flag Coverage Δ
python-3.13 65.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 4b10111 into main Oct 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants