Skip to content

feat(setup): add --no-overrides one-shot defaults switch - #929

Merged
potiuk merged 3 commits into
apache:mainfrom
justinmclean:override-bypass-one-shot2
Aug 3, 2026
Merged

feat(setup): add --no-overrides one-shot defaults switch#929
potiuk merged 3 commits into
apache:mainfrom
justinmclean:override-bypass-one-shot2

Conversation

@justinmclean

@justinmclean justinmclean commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Implements acceptance criterion 6 of specs/adoption-and-setup.md:
a per-invocation --no-overrides flag that runs any framework skill
against framework defaults for that single invocation, ignoring both
override surfaces without modifying or deleting them. The safety
baseline (confidentiality, privacy, security) still applies.

Adds the protocol to docs/setup/agentic-overrides.md under a new
"One-shot defaults run" section, lists the flag in the setup SKILL.md
Inputs table, and ships a three-case eval suite exercising:

  • flag present + override exists → skip-overrides
  • flag present + no override → skip-overrides
  • flag absent + override exists → apply-overrides (baseline)

Generated-by: Claude (claude-sonnet-4-6)

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • [X ] prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:

@justinmclean justinmclean self-assigned this Jul 27, 2026
justinmclean and others added 3 commits August 3, 2026 01:51
Implements acceptance criterion 6 of specs/adoption-and-setup.md:
a per-invocation --no-overrides flag that runs any framework skill
against framework defaults for that single invocation, ignoring both
override surfaces without modifying or deleting them.  The safety
baseline (confidentiality, privacy, security) still applies.

Adds the protocol to docs/setup/agentic-overrides.md under a new
"One-shot defaults run" section, lists the flag in the setup SKILL.md
Inputs table, and ships a three-case eval suite exercising:
  - flag present + override exists → skip-overrides
  - flag present + no override → skip-overrides
  - flag absent + override exists → apply-overrides (baseline)

Note: this branch is based on main and is independent of the
in-flight magpie-local-convention branch.  When that branch merges
(adding .apache-magpie-local/ as a second override surface), the
"One-shot defaults run" prose here will need a minor update to say
"skip steps 1–5" instead of "1–3" and to mention .apache-magpie-local/
alongside .apache-magpie-overrides/.  The merge conflict is shallow
and localised to the one paragraph.

Generated-by: Claude (claude-sonnet-4-6)
Rebased onto main and resolved two conflicts: main added the
step-overrides-surface suite and the two-directory (personal-local +
committed) override protocol while this branch was open. Both suites now
coexist (12 cases), and the --no-overrides check becomes step 0 of the
five-step protocol rather than the three-step one it was written against.
Step 0 now also keeps the step-5 recap, so a bypassed run records which
override files existed but were not consulted -- otherwise the audit
trail cannot distinguish a bypass from a repo with no overrides at all.

The eval predicates needed tightening. Both keyed on the flag name, which
appears in a correct reason and in a reason arguing the exact opposite:

  has_bypass_reason: no-?overrides|framework default|not (be )?read|...

Given the reason "The override file was read and applied because no
--no-overrides flag was present" -- an apply-reason on a skip case --
that pattern matches, so the assertion passed on a wrong answer. The
same held for has_apply_reason via its 'no .*flag' branch. decision is
an enumerated field and still caught a wrong call, so the eval was not
blind, but the reason predicates gave the appearance of prose checking
without the substance.

Both now require the matching verb (skipped/not-consulted versus
applied/consulted) and reject the opposing phrasing, verified against
eight cases in both directions -- including 'No bypass flag was
supplied, so the override file was read and applied', where the skip
word is itself negated and an earlier draft wrongly rejected it.

Full-word alternations rather than truncated stems, because typos(1)
reads skipp? and ignor as misspellings.

Generated-by: Claude Code (Opus 5)
@potiuk
potiuk force-pushed the override-bypass-one-shot2 branch from 1cb030a to 25d4f87 Compare August 2, 2026 23:57

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving with a rebase and a fixup pushed to the branch.

Rebase. Main moved twice under this branch: it added the step-overrides-surface suite, and it replaced the 3-step override protocol with a 5-step, two-directory one (personal-local + committed). Both eval suites now coexist — 12 cases, not 8 or 9 — and --no-overrides is re-anchored as step 0 of the five-step protocol rather than the three-step one it was written against.

One behaviour decision I made on your branch, so flagging it explicitly rather than burying it in a diff. Step 0 originally said "skip steps 1–3 entirely", which under the new protocol would also skip the recap. I changed it to skip steps 1–4 but still run step 5, reporting that the run used --no-overrides and naming the override files that existed but were not consulted. Reasoning: otherwise the audit trail cannot distinguish a deliberate bypass from a repo that simply has no overrides on disk, and the bypass is the case you most want recorded. Say the word if you disagree and I will revert that bit.

The eval predicates needed tightening. Replacing the MANUAL grade with deterministic regexes was the right instinct, but both keyed on the flag name:

has_bypass_reason: no-?overrides|framework default|not (be )?read|not applied|ignor

Given the reason "The override file was read and applied because no --no-overrides flag was present" — an apply-reason on a skip case — that pattern matches, so the assertion passed on a wrong answer. has_apply_reason had the same hole through its no .*flag branch. The flag name appears in a correct reason and in one arguing the exact opposite, so it cannot discriminate.

decision is enumerated and still caught a wrong call, so the eval was not blind — but the reason predicates were decoration rather than a check.

Both now require the matching verb (skipped / not-consulted versus applied / consulted) and reject the opposing phrasing. Verified across eight cases in both directions, including "No bypass flag was supplied, so the override file was read and applied", where the skip word is itself negated and my first attempt wrongly rejected it. Full-word alternations rather than truncated stems, because typos reads skipp? and ignor as misspellings.

Worth generalising: for any predicate over a decision's prose, the test is not "does a right answer pass" but "does a reason arguing the other decision fail". Noted in the suite README so the next editor checks both directions.

@potiuk
potiuk merged commit 9584028 into apache:main Aug 3, 2026
10 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

Development

Successfully merging this pull request may close these issues.

2 participants