Skip to content

feat(panicbot): directives from the repo deed, deny-only = full suite minus deny, deed-declared target - #672

Merged
hyperpolymath merged 2 commits into
mainfrom
feat/panicbot-deed-directives
Nov 13, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
feat/panicbot-deed-directives

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Implements the owner rulings of 2026-11-13 for panicbot (bots/panicbot). Based on main (#670 has merged).

  1. Deny-only directives mean the full suite minus the deny; an explicit allow still narrows; deny wins. The old static-trio default (and AllowedCommands::legacy_static) is removed.
  2. Directives from the repo deed. Order: the (bot :name panicbot ...) entry in (bot-directives ...) of <repo>_chora.deed at the repo root; else the legacy .machine_readable/bot_directives/panicbot.a2ml (read only, no target); else the full suite with no target. If the deed entry exists the legacy file is ignored with a note.
  3. Dynamic target. (target :build "..." :program "..."): :build runs once via sh -c in the scanned repo, timeout drawn from the suite budget; :program goes through the existing canonicalise/executable checks. A failed build is an error part and nothing is attacked. pull_request_target / workflow_run refuse the build as well as the attack. No target: dynamic parts are not_applicable ("no target declared in the deed (bot-directives (bot :name panicbot (target …)))"). CLI --target overrides the declared target, build included.

Design notes

  • No deed reader existed in gitbot-fleet, so src/deed.rs is a small strict reader following deed.abnf. It is a reader, not the validator (deed_lint stays the gate). Malformed deed or clause shapes are errors, never a default.
  • One spelling: (bot :name panicbot ...) only (standards #1502). The bare form (bot panicbot ...) is an error naming the canonical spelling.
  • build.rs is new and Engine gains build. scanner.rs and main.rs are untouched.

Tests

Deny-only (deed and legacy), allow plus deny, deed over legacy, legacy fallback, neither source, malformed-shape table, bare bot form is an error (unit and CLI level), two deeds at the root, target built then assault/ambush/adjudicate on a stub engine, failed build, refused build under both privileged triggers, build timeout from the budget, CLI override, real sh -c build tests, CLI-level stub tests. Three legacy tests that asserted the old trio default now assert the full suite, as the ruling requires. Run: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test in bots/panicbot, STANDARDS_DIR=... tests/fleet-report-back-test.sh (223 passed) and tests/fleet-report-back-build-test.sh (65 passed).

Not done

:build runs repository code by design and is not sandboxed beyond the privileged-trigger refusal and the timeout.

🤖 Generated with Claude Code

https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8

…uite minus deny, deed-declared dynamic target

Owner rulings 2026-11-13.

- Directives are read from the (bot panicbot ...) clause of <repo>_chora.deed
  first, then the legacy panicbot.a2ml (read only), else the full suite.
  A new strict S-expression reader (deed.rs) fails loudly on malformed input.
- A directive with only deny is the full suite minus deny; explicit allow still
  narrows; deny wins. The old static-trio default is removed.
- (target :build :program) declares the dynamic-mode target. :build runs via
  sh -c in the scanned repo under the suite budget; a failed build is an error
  part; pull_request_target / workflow_run refuse the build too. No target:
  dynamic parts are not_applicable with the deed-terms reason. --target overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 68e6523 and 86a3342.

Files selected for processing: 9

  • bots/panicbot/src/build.rs
  • bots/panicbot/src/config.rs
  • bots/panicbot/src/deed.rs
  • bots/panicbot/src/directives.rs
  • bots/panicbot/src/fleet.rs
  • bots/panicbot/src/lib.rs
  • bots/panicbot/src/suite.rs
  • bots/panicbot/tests/envelope_parity_test.rs
  • docs/REPORT-BACK.adoc
  • 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

…ot ...)

The deed grammar rejects a bare symbol after bot (standards #1502), so the
reader accepts only the :name form and the bare form is an error naming the
canonical spelling. Tests, docs and the no-target reason use the canonical form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZkERqsQWMogHRpM2z8
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 13, 2026 13:26
@hyperpolymath
hyperpolymath merged commit b079527 into main Nov 13, 2026
66 checks passed
@hyperpolymath
hyperpolymath deleted the feat/panicbot-deed-directives branch November 13, 2026 13:26
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T13:30:52.723456Z 86a3342 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86a33422d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +87 to +88
if status.success() {
return Ok(());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Terminate surviving helpers after a successful build

When a deed build backgrounds a process (for example, tool &) or a build tool launches a daemon and the shell exits successfully, this branch returns without killing the process group because cleanup only occurs on timeout. The helper can therefore keep running through later suite parts, and the detached reader threads may remain blocked on inherited output pipes. Tear down the process group after the shell completes, including on success.

Useful? React with 👍 / 👎.

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.

3 participants