Skip to content

chore: re-vendor the description-cap gate at context-police v2.3.0 - #23

Merged
wan-huiyan merged 1 commit into
mainfrom
chore/gate-v2.3.0
Aug 5, 2026
Merged

chore: re-vendor the description-cap gate at context-police v2.3.0#23
wan-huiyan merged 1 commit into
mainfrom
chore/gate-v2.3.0

Conversation

@wan-huiyan

Copy link
Copy Markdown
Owner

Re-vendors check_skill_descriptions.py from context-police@c413fd4 (v2.3.0), which closes two gaps in the gate's own guarantees.

1. Wrap corruption is now scored over every skill, disabled included, and fails the build. It was built from the model-invocable subset:

corrupt = [s for s in live if s.wrap_corruption]   # live = not disabled

so a hyphen break inside a disable-model-invocation: true skill was neither printed nor failed. In agent-traffic-control 74 of 94 skills are disabled — which is exactly why four real corruptions there had to be found through --json rather than CI. The cap check legitimately skips disabled skills (no listing budget consumed); corruption is different — the description is still read when the skill is invoked by name, and ships corrupt the moment it is re-enabled. Disabled hits now print in their own group.

2. New NO HEADROOM tier (MIN_HEADROOM = 40), separate from APPROACHING CAP — which spans everything above 1,152 chars, so a description with 23 chars of slack shared a bucket and a colour with one that had 340. Sorted tightest-first, remaining slack on every row. Exit code unchanged: under the cap is not a failure, however tight.

--json gains min_headroom, counts.critical_headroom and per-skill critical/headroom; counts.wrap_corruption now spans all skills, matching the text report.

The cap arithmetic has not changed since v2.2.0 (desc_chars - (MAX_DESC_CHARS - 1)), so no "N chars discarded" figure in this repo moves.

Verified: gate exit 0 in both the text and --json forms after re-vendoring.

🤖 Generated with Claude Code

From context-police@c413fd4. Two changes to the gate's own guarantees, both
found by auditing the gate against the sentences that describe it:

1. Wrap corruption is now scored over EVERY skill, disabled included, and fails
   the build. It was built from the model-invocable subset, so a hyphen break
   inside a `disable-model-invocation: true` skill was neither printed nor
   failed. In agent-traffic-control 74 of 94 skills are disabled, which is why
   four real corruptions there had to be found via --json rather than CI.

   The cap check legitimately skips disabled skills -- they consume no listing
   budget. Corruption is a text-integrity defect: the description is still read
   when the skill is invoked by name, and ships corrupt the moment the skill is
   re-enabled. Disabled hits now print in their own group.

2. New NO HEADROOM tier (MIN_HEADROOM = 40), separate from APPROACHING CAP.
   WARN_FRACTION = 0.75 spans everything above 1,152 chars, so a description
   with 23 chars of slack shared a bucket and a colour with one that had 340.
   Exit code unchanged: under the cap is not a failure, however tight.

--json gains min_headroom, counts.critical_headroom, and per-skill
critical / headroom; counts.wrap_corruption now spans all skills, matching the
text report. Cap arithmetic unchanged since v2.2.0, so no "N chars discarded"
figure moves.

Verified: gate exit 0 in both the text and --json forms after re-vendoring.

The gate here is CI-only (not under a plugin source dir), so no version bump.
@wan-huiyan
wan-huiyan merged commit 2bf73a4 into main Aug 5, 2026
1 check passed
@wan-huiyan
wan-huiyan deleted the chore/gate-v2.3.0 branch August 5, 2026 20:41
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