Skip to content

admin-bypass-sweep (5) the consent sentence names the resolved trunk - #505

Open
EdbertChan wants to merge 4 commits into
mainfrom
plan/admin-bypass-sweep-5-the-consent-sentence-names-the-resolved-trunk
Open

admin-bypass-sweep (5) the consent sentence names the resolved trunk#505
EdbertChan wants to merge 4 commits into
mainfrom
plan/admin-bypass-sweep-5-the-consent-sentence-names-the-resolved-trunk

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

The consent sentence now names the repository's resolved trunk branch.

This keeps authorization exact while supporting repositories with different trunk names.

Review Claim

The consent sentence uses the resolved trunk branch and still requires full, exact, non-paraphrased authorization.

Review Lane

behavior

Review Unit

product-skill

Safety Invariant

Paraphrase remains refused, the full sentence must still be typed, and only the branch name varies with the resolved trunk.

Slice Rationale

This is one behavior slice for the consent text and includes its focused contract test.

Non-goals

  • Does not relax the no-paraphrase rule.
  • Does not add another authorization path.
  • Does not change authorized actions.
  • Does not change any other skill.

Architecture

Before

graph TD
    A["Consent sentence uses a fixed branch name"]
Loading

After

graph TD
    A["Resolved trunk branch"] --> B["Consent sentence template"]
    B --> C["Exact full-sentence authorization"]
Loading

Test Plan

Test Plan
  • python3 -m unittest discover -s product/skills/admin-bypass-sweep/tests -v

    Ran 3 tests in 0.001s
    OK

  • bash scripts/scrub-handoff-artifacts.sh

    scrub-handoff-artifacts-ok

  • python3 engine/skills/make-pr/scripts/preflight.py --base origin/main

    ok preflight passed

Revert Plan

Revert Plan
  • Safe to revert? Yes.
  • Revert command: git revert <merge-commit-sha>.
  • Post-revert steps: None.
  • Data migration? No.

Note

Low Risk
Documentation and contract tests only; authorization stays strict (exact full sentence, no paraphrase) while aligning branch names with each repo’s default branch.

Overview
Updates the admin-bypass-sweep skill so human consent and merge steps use the repo’s resolved default trunk ({resolved_trunk_branch}) instead of assuming master.

Consent: The required line is now a template (force-merges to {resolved_trunk_branch}). Step 1 adds gh repo view … defaultBranchRef to resolve the branch; the human must type the fully resolved sentence before Step 4. No-paraphrase and per-invocation rules are unchanged.

Procedure: Stack grouping, retargeting (gh pr edit --base), conflict/rebase worktrees, and wording now reference the resolved trunk consistently.

Tests: Adds test_consent_sentence.py plus main/master fixture repos to lock the template shape and rendered consent strings.

Reviewed by Cursor Bugbot for commit 96ce0d1. Bugbot is set up for automated code reviews on this repo. Configure here.

Invoker Bot and others added 4 commits September 12, 2026 19:55
…e the consent sentence from the resolved trunk instead of hard-coding master.

Review claim: The consent sentence names the repo's actual trunk branch.
Review lane: behavior
Safety invariant: Paraphrase is still refused and the sentence must still be typed in full; only the branch name varies with the resolved trunk.
Effectiveness measurement: A fixture repo whose trunk is main must require the sentence ending 'force-merges to main', and one whose trunk is master must require 'master'. Both asserted in the skill's test directory.
Slice rationale: One step of the sweep skill's consent text; stacked last because it edits the same SKILL.md as the four steps before it.
Architectural effect: The consent string becomes a template resolved from the repo rather than a literal.
Goal: Change the STOP section of product/skills/admin-bypass-sweep/SKILL.md so the required consent sentence is generated from the resolved trunk branch, keeping the no-paraphrase rule intact.
Motivation: A sweep in a repo whose trunk is main reported that fact to the human and then required, and accepted, a consent sentence naming master. The skill's own header claims nothing in it is tied to a specific repo.
Alternative considerations: Accepting either branch name was rejected because it weakens the no-paraphrase rule. Leaving it hard-coded and adding a note was rejected because the note would itself be the paraphrase the rule forbids.
Implementation details: Replace the literal consent sentence in the STOP section with a template whose branch name comes from the trunk resolved in Step 1, and state that the resolved sentence must be typed in full with no paraphrase. Add a skill-lint test asserting no literal branch name is embedded in the consent template, plus fixtures for a main-trunk repo and a master-trunk repo.
Non-goals: Does not relax the no-paraphrase rule, does not add an alternative authorization path, does not change which actions the consent authorizes, and does not touch any other skill.
Layer: domain
Feature state: active
Files: product/skills/admin-bypass-sweep/SKILL.md, product/skills/admin-bypass-sweep/tests/
Change types:
- product/skills/admin-bypass-sweep/SKILL.md: docs-only
- product/skills/admin-bypass-sweep/tests/test_consent_template.py: create
Acceptance criteria:
- `python3 -m unittest discover -s product/skills/admin-bypass-sweep/tests -v` exits 0.
- No literal branch name appears inside the consent template.
- The no-paraphrase rule is still stated explicitly.

Solution:
  Generate the consent sentence from the resolved trunk instead of hard-coding master.
Review claim: The consent sentence names the repo's actual trunk branch.
Review lane: behavior
Safety invariant: Paraphrase is still refused and the sentence must still be typed in full; only the branch name varies with the resolved trunk.
Effectiveness measurement: A fixture repo whose trunk is main must require the sentence ending 'force-merges to main', and one whose trunk is master must require 'master'. Both asserted in the skill's test directory.
Slice rationale: One step of the sweep skill's consent text; stacked last because it edits the same SKILL.md as the four steps before it.
Architectural effect: The consent string becomes a template resolved from the repo rather than a literal.
Goal: Change the STOP section of product/skills/admin-bypass-sweep/SKILL.md so the required consent sentence is generated from the resolved trunk branch, keeping the no-paraphrase rule intact.
Motivation: A sweep in a repo whose trunk is main reported that fact to the human and then required, and accepted, a consent sentence naming master. The skill's own header claims nothing in it is tied to a specific repo.
Alternative considerations: Accepting either branch name was rejected because it weakens the no-paraphrase rule. Leaving it hard-coded and adding a note was rejected because the note would itself be the paraphrase the rule forbids.
Implementation details: Replace the literal consent sentence in the STOP section with a template whose branch name comes from the trunk resolved in Step 1, and state that the resolved sentence must be typed in full with no paraphrase. Add a skill-lint test asserting no literal branch name is embedded in the consent template, plus fixtures for a main-trunk repo and a master-trunk repo.
Non-goals: Does not relax the no-paraphrase rule, does not add an alternative authorization path, does not change which actions the consent authorizes, and does not touch any other skill.
Layer: domain
Feature state: active
Files: product/skills/admin-bypass-sweep/SKILL.md, product/skills/admin-bypass-sweep/tests/
Change types:
- product/skills/admin-bypass-sweep/SKILL.md: docs-only
- product/skills/admin-bypass-sweep/tests/test_consent_template.py: create
Acceptance criteria:
- `python3 -m unittest discover -s product/skills/admin-bypass-sweep/tests -v` exits 0.
- No literal branch name appears inside the consent template.
- The no-paraphrase rule is still stated explicitly.

Invoker-Finalize-Id: 483df3ef-eb27-4ef2-a484-7f49f06df995
…terministic proof for the trunk-derived consent sentence.

Review claim: The skill's lint asserts the consent template carries no hard-coded branch name.
Review lane: proof
Safety invariant: Proof-only; adds no product behavior.
Effectiveness measurement: The suite fails if a literal branch name is reintroduced into the consent template.
Slice rationale: One proof slice for this step.
Architectural effect: None; verification only.
Goal: Prove the trunk-derived consent sentence deterministically.
Motivation: The defect is a hard-coded literal in a file that claims repo-genericity, so the proof is a lint over that literal.
Alternative considerations: Manual verification was rejected as non-deterministic.
Implementation details: Execute the command below as the terminal proof.
Non-goals: No product edits here; proof only.
Layer: app_regression
Feature state: active

Exit code: 0
Invoker-Finalize-Id: 189a303e-99cf-4b97-97a2-8550908b1c93
… that no ephemeral inter-task handoff files remain.

Review claim: The workflow leaves no scratch handoff artifacts behind.
Review lane: cleanup
Safety invariant: Read-only; never deletes files, alters the index, or commits caller work.
Effectiveness measurement: The gate fails when a plans/invoker-handoff.* or lens-*.json file is still present after the leaf tasks complete.
Slice rationale: One terminal hygiene gate for the workflow.
Architectural effect: None; check only.
Goal: Confirm no ephemeral handoff files survive the run.
Motivation: Inter-task scratch files leak into diffs and read as part of the work.
Alternative considerations: Deleting them automatically was rejected; the gate reports, it does not mutate.
Implementation details: Run scripts/scrub-handoff-artifacts.sh without --apply.
Non-goals: No deletion, no index changes, no commits.
Layer: app_regression
Feature state: active

Exit code: 0
Invoker-Finalize-Id: ffd21b15-1f75-466e-a821-143eba056dce
…a69ab8e1e-7b0f8a5f — Terminal check that no ephemeral inter-task handoff files remain.

Review claim: The workflow leaves no scratch handoff artifacts behind.
Review lane: cleanup
Safety invariant: Read-only; never deletes files, alters the index, or commits caller work.
Effectiveness measurement: The gate fails when a plans/invoker-handoff.* or lens-*.json file is still present after the leaf tasks complete.
Slice rationale: One terminal hygiene gate for the workflow.
Architectural effect: None; check only.
Goal: Confirm no ephemeral handoff files survive the run.
Motivation: Inter-task scratch files leak into diffs and read as part of the work.
Alternative considerations: Deleting them automatically was rejected; the gate reports, it does not mutate.
Implementation details: Run scripts/scrub-handoff-artifacts.sh without --apply.
Non-goals: No deletion, no index changes, no commits.
Layer: app_regression
Feature state: active
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c8671862-bb1f-4f72-bf60-6f2e3e59ad92)

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