Skip to content

fix(policy): make focused checks advisory by default - #779

Closed
TheGreatAxios wants to merge 13 commits into
mainfrom
fix/focused-advisory-default
Closed

TheGreatAxios wants to merge 13 commits into
mainfrom
fix/focused-advisory-default

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Make the focused scope heuristic advisory by default (onFail: label, rather than fail), and set that severity explicitly in the recommended pack.
  • Cover policy precedence/export, stored-pack compatibility, verdicts, host rendering, and the policy corpus; update user and policy documentation.

Compatibility and visible behavior

This intentionally changes existing policy files that omit both the focused rule's onFail and the top-level severity: failed or unconfirmed focus checks become advisory. GitHub shows focused: check and a Notes: entry; Bitbucket Data Center shows the note only. A focused advisory does not by itself make the verdict Fail or Unsure or request changes.

Precedence remains rule override, then top-level severity, then built-in default. Explicit onFail: fail still blocks; explicit onFail: ask still asks a maintainer. Stored packs retain their existing omitted-onFail meaning of fail; their reader is unchanged. Required CI, forbidden paths, and other blocking checks are unchanged.

Motivation and scope

react-ui #147 received an unsupported blocking focus verdict. Its current hook-and-tests diff does not establish that two fixes caused the reported issue. This change makes the heuristic a flag rather than a default gate; it does not claim to fix inference accuracy.

Related incident tracking: CL-11825, section “Confirmed follow-up symptoms (2026-10-30)”. That observability work is separate: this PR does not implement or close it. Dedicated Linear ticket creation/deduplication remains blocked. A separate react-ui policy override is outside this PR.

Only deterministic severity wiring changes; no prompts or model behavior change. Inference eval before/after is not applicable. Model-invariant verification remains applicable and passed.

Verification

Completed review and verification before publication, using Bun 1.4.4:

  • Unit suite: 1,495 passing (prior implementation verification); independent reviewer clean.
  • bun run check: exit 0, all 21 typecheck stages and 2,114-module hub bundle; repeated successfully at publication.
  • bun --conditions=intx-src test tests/model: exit 0, 8 passing, including 300 seeded walks of 10 events.
  • bun --conditions=intx-src test tests/policy-corpus packages/triage-contracts/src/policy-rules.test.ts packages/triage-workflows/src/logic/render.test.ts packages/triage-workflows/src/pr-triage.test.ts packages/triage-workflows/src/triage-steps.test.ts: exit 0, 161 passing, 714 assertions.
  • sh tooling/vendor-diff-check.sh: exit 0.
  • git diff --check: exit 0.

Rollout

Not live yet. Opening this PR does not deploy the default or change existing repository policy files. Merge and deployment require a separate authorized action. Published from an isolated worktree based on freshly fetched origin/main at c75fe6e599fdfc38bd9a2a59b6a500821fafeb65; existing worktrees and PRs #777/#778 are untouched.

@corbits-triage

corbits-triage Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Fail

@TheGreatAxios, please address the following:

  • merge conflicts with base

Notes:

  • Risk: medium (1 recently fixed file)

Changed since the last verdict (Fail at bf45714): 3 new commits.

@corbits-triage corbits-triage Bot 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.

Changes the default severity of the focused scope heuristic from fail to advisory (onFail: label) in the recommended pack and for policy files that omit both the rule's onFail and the top-level severity. Failed or unconfirmed focus checks now surface as notes rather than blocking the verdict, while explicit onFail: fail and ask behave as before and stored packs keep their existing meaning.

This review did not read the whole change; approve and merge are held until a review does.

The fail-default sentence still read as if focused blocked the pull request. The label default, and the code, already treat an omitted focused onFail as a note.

@corbits-triage corbits-triage Bot 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.

Changes the default severity of the focused scope heuristic from fail to advisory (onFail: label), set explicitly in the recommended pack, with matching docs and tests. Existing policy files that omit both the rule's onFail and the top-level severity will see failed focus checks become advisory rather than blocking. No review findings were reported for this change.

This review did not read the whole change; approve and merge are held until a review does.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Oct 31, 2026
@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Oct 31, 2026
…ider-other-than-anthropic-add-an' into fix/focused-advisory-default

# Conflicts:
#	packages/triage-contracts/README.md
…ility-foundation-using-interchange' into fix/focused-advisory-default
@TheGreatAxios
TheGreatAxios removed this pull request from the merge queue due to a manual request Oct 31, 2026
…default

# Conflicts:
#	packages/triage-contracts/README.md

@corbits-triage corbits-triage Bot 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.

Changes the focused scope heuristic to default to advisory (onFail: label) rather than fail, sets that severity explicitly in the recommended pack, and updates docs and tests to match. Existing policy files that omit both the rule's onFail and the top-level severity will see focused failures become advisory, while stored packs keep their fail meaning. One finding: the README's Policy paragraph is duplicated.

Comment on lines +12 to 13
The `focused` policy-file rule defaults to `onFail: label`, and the recommended pack sets it explicitly. This includes existing files that omit severity: a failed or unconfirmed focus heuristic is a note, plus `focused: check` on GitHub, not a Fail or Unsure verdict. Precedence stays rule `onFail`, then top-level `onFail`, then the built-in default; explicit `fail` and `ask` remain blocking and maintainer-directed respectively. Stored packs still encode `fail` by omitting `onFail`; their reader is unchanged.

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.

P3 · README Policy paragraph now appears twice

Why it is wrong: The README edit adds the new focused paragraph, but it also re-adds the existing "A policy sets which rules run…" paragraph immediately after the original. The section now repeats the same text back to back, which is a documentation error that will confuse readers of the package README.

Triggering input: Open packages/triage-contracts/README.md and read the Policy section. The paragraph beginning "A policy sets which rules run on a repository's pull requests" appears twice in a row.

Suggested fix: Remove the duplicate copy so the paragraph appears once, keeping the new focused-advisory paragraph in its intended position:

A policy sets which rules run on a repository's pull requests and what happens after. Its rules are stored under `checks` (built-in) and `custom`. ...

Then rerun the docs check or a quick read of the section to confirm there is only one copy.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Oct 31, 2026
@corbits-triage
corbits-triage Bot dismissed their stale review October 31, 2026 02:10

This pull request is no longer ready to approve, so this approval no longer stands.

@corbits-triage corbits-triage Bot 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.

Triage requests changes:

  • Merge conflicts: merge conflicts with base

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Closing as superseded: this change landed on main inside #782 (the focused rule's label default, its corpus file and docs are already there).

auto-merge was automatically disabled November 1, 2026 04:27

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant