Skip to content

fix(tier1): keep the hook gate failure FAIL beside an incomplete scan under a policy override - #563

Merged
rng1995 merged 26 commits into
mainfrom
naren/fix-tier1-hook-gate-followups
Nov 16, 2026
Merged

rng1995 merged 26 commits into
mainfrom
naren/fix-tier1-hook-gate-followups

Conversation

@rng1995

@rng1995 rng1995 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #459. The gate failure for hooks that SkillSpector cannot model is meant to keep the Tier 1 security check failed, whatever a --policy severity override does. When an override lowered the hook Critical and another gap recorded the scan as incomplete, the check was reported as INCOMPLETE instead of FAIL, and the terminal summary advised installing SkillSpector or skipping the check. Separately, a check that failed beside an incomplete scan showed only its first gate failure in the terminal "what to fix" list, which is usually the error for the gap, so the hook gate failure was not shown. This branch has main 186134b merged.

Changes

  • Hook gate under a --policy override beside another gap. On main, the reported status puts only a blocking finding or confirmed_failure ahead of an incomplete scan. An override that lowered the hook Critical left only the gate failure, so with another gap, such as the SkillSpector v2.13.4 parse-limit row for a hook "timeout" key or a folder skill's missing reference, the check and the JSON status were INCOMPLETE, although the gate failure stood. The hook gate now also sets confirmed_failure, and merge_with_prefix keeps that mark from each skill, so a folder scan stays FAIL too. Other gate failures, such as the error for the remaining incomplete analysis, do not set it, so a scan that is only incomplete stays INCOMPLETE. The scan is still recorded as incomplete, so publication eligibility stays Incomplete.
  • "What to fix" for a check that failed beside an incomplete scan. The check's item names its first gate failure, as before. Its other gate failures now follow as their own items, after everything main already lists for the check (the first gate failure and, for a folder skill, the unresolved file reference item), so main's items keep their order and the hook gate failure is listed after them. A check whose scan is complete is listed as before. This applies with or without an override.
  • The tier1 docs say the gate failure keeps the check FAIL beside another gap also under a --policy override. The unreleased hook gate CHANGELOG entry describes both changes.

validate --tiers 1 --checks security on a plugin whose hook has a "timeout" key (SkillSpector v2.13.4 report), with SECURITY.skillspector_hook_payload_unverified: low in the policy:

main 5978061 this branch
summary 0/1 checks passed · 1 didn't run 0/1 checks passed · 1 failed
what to fix 1. security didn't run: skillspector not installed → or skip it: --skip security 1. the parse-limit error (... static_parse_limit ...; security scan did not complete)
2. hooks/hooks.json: SkillSpector could not model these hooks; this check cannot pass while they are present
JSON status incomplete failed

Without the override, main already reports 1 failed but lists only item 1. For a skill with a missing reference and a settings hook in a folder run, main lists the gap error and the unresolved reference item (and, under the override, only the reference item beside 1 didn't run); this branch reports 1 failed and adds the hook gate failure as item 3.

Known trade-offs

  • A JSON report for a check with the hook gate now carries "confirmed_failure": true. Retained reports already read this field.
  • The compact validate verdict still picks its wording from whether the scan is incomplete, so for this case it reads Changes required: Security Scan was incomplete in Tier 1 beside the ✗ FAIL label, as it already does on main for the same scan without an override. The check status, JSON status and reports say FAIL. The open Enable public plugin assessment and saved-run reports #394 bases that wording on the reported status.
  • In "what to fix", the hook gate failure comes after the error for the gap rather than before it, so main's items are not reordered. At most three items are shown, as before; a folder scan with several such skills counts the rest in +N more in detailed reports.
  • The branch history has commits that later commits on the branch revert: a compact verdict change, plugin reference line ordering, and two CHANGELOG notes for them. The net change against main is the hook gate status and the "what to fix" items above. Use squash and merge, so main gets one commit that describes what this PR ships.

Tests

  • tests/validators/test_skillspector_hook_surface.py and tests/reporting/test_shared_run_status.py: on main 5978061, 23 failed, 102 passed; on this branch, 125 passed. The 23:
    • 5 for the status: the two timeout-parse-limit variants of test_policy_overrides_cannot_pass_the_hooks, both cases of test_a_policy_override_keeps_a_folder_scan_failed_beside_a_missing_reference, and test_confirmed_failure_survives_a_folder_merge.
    • 18 for "what to fix": existing cases in which a hook gate fails beside an incomplete scan. Their shared helper now also checks that the first item is still the first gate failure, that an unresolved reference keeps its item next, and that the hook gate failure is listed; on main it is not listed. The one other such case, an incomplete LLM stage, passes on main, where the hook gate failure is already listed.
    • With the source of 78a6ae0, before the "what to fix" change, those 18 and the 4 override cases fail (22 failed, 103 passed).
  • The override tests also check the terminal summary counts the check as 1 failed, with no install or --skip advice, and a guard pins that a scan with only the incomplete-analysis gate stays INCOMPLETE.
  • tests/models, tests/reporting, tests/validators, tests/test_quality_policy_gate.py, the other tests that render the Tier 1 summary, tests/test_cli.py, tests/test_model_catalog.py, and the packaging, change classifier and CI workflow tests: 8217 passed, 4 skipped, 2 failed. test_validate_tier3_writes_the_same_report_pair and test_harbor_environment_kwarg_contract_matches_installed_source also fail on main here, because the local Harbor install is older than main's pin.
  • tests/golden, tests/cli, tests/ci and the onboarding and base-install tests: 2131 passed, 21 skipped, 8 failed. The 8, in tests/ci/test_prepare_security_baselines.py, tests/ci/test_feedback.py and tests/ci/test_all_tier_preflight.py, also fail on main 5978061 here: their python -I subprocesses ignore PYTHONPATH and import the older package installed in the local environment instead of the tree under test.
  • ruff check passes on the changed files. ruff format --check passes on console_ui.py and the changed test files; models/result.py and validators/security.py fail it on main too, on lines this branch does not touch. The OSS boundary scan passes.
  • The branch includes main 186134b, and git merge-tree --write-tree against it is clean. The counts above were measured with main 5978061 merged; main's later commits change none of the PR's files or the model-catalog files.
  • Python 3.12 CI failure in test_catalog_status_and_header_trickles_cannot_extend_the_wall_clock_deadline[headers] (1.1185 s against < 0.3), in the run for 78a6ae0. I read it as a runner timing flake unrelated to this branch:
    • CI on the later head 026e271, which carries the same branch change, passed every job, including Tests (Python 3.12). The failing Python 3.12 job ran 726 s against 427 s for the passing one, on a slower runner.
    • The branch changes nothing on that test's path. The test loads only skillevaluator.model_catalog and skillevaluator.provider_config, and neither they nor tests/test_model_catalog.py are changed here. Main last changed the test in fix(ci): stop the Tier 1 runner missing a Ctrl-C, and deflake timing-dependent tests #568, which this PR's base already had; nothing on main has changed it since.
    • In the same run, the Python 3.13 and 3.14 test jobs passed on the same commit.
    • Locally, the same request times out at 0.100 to 0.116 s in 40 runs each on this branch and on main 5978061. With the CPU saturated, the HTTPS handler setup alone took up to about 1.1 s on main as well as on this branch, before the first deadline check, which is the size of the CI time; how many runs pass 0.3 s varies from run to run on identical trees.
    • Main's own CI fails on other wall-clock bounds of this kind. As of 2026-11-16 13:20 UTC, the eight failed main CI runs from 69584dd (2026-11-13) to e45c091 (2026-11-16) failed only on other bounds: the escaped-text masking bounds (Python 3.13 and 3.14, four runs), the streaming redactor bound (Python 3.12, twice), the 1 s NVIDIA Build bridge start wait, the RAGAS cleanup wait and a macOS local-mode cancellation test. This test failed in none of them, nor in the 34 failed runs of other PRs from 2026-11-14 to 2026-11-16 (UTC). fix(ci): stop the Tier 1 runner missing a Ctrl-C, and deflake timing-dependent tests #568 raised the sibling body-trickle bound from 0.5 s to 5 s after a stalled runner needed 0.86 s; this test's bound stayed at 0.3 s.
    • The previous head 6cdaa3e, whose source is identical (78a6ae0 only adds test lines in the hook surface tests), passed the Python 3.12 job. Under a saturated CPU the lost time is spent before the first connection deadline check, so the deadline fires at once afterwards: the elapsed bound measures scheduling, not the deadline.

🤖 Generated with Claude Code

rng1995 and others added 10 commits November 13, 2026 20:21
Start the follow-up fixes from current main.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der a policy override

The gate failure for hooks SkillSpector cannot model is meant to keep the
security check failed whatever a --policy severity override does. The
reported status only put a blocking finding or confirmed_failure ahead of
an incomplete scan. When an override lowered the Critical and another gap,
such as the SkillSpector v2.13.4 parse-limit row for a hook "timeout" key,
recorded the scan as incomplete, the check was reported as INCOMPLETE
although its gate failure stood.

The hook gate now also marks the result as a confirmed failure, and a
folder merge keeps that mark from each skill. Other gate failures, such as
the error for the remaining incomplete analysis, do not set it, so a scan
that is only incomplete stays INCOMPLETE.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d in the validate verdict

The final box of the compact validate view chose between "failed" and
"didn't run" from is_incomplete alone. A Tier 1 security check with the
hook gate failure and another gap, such as the SkillSpector v2.13.4
parse-limit row for a hook "timeout" key, was therefore shown as
"Security Scan didn't run in Tier 1", while its own detail line, the
Tier 1 card and the reports said it failed. With several failed checks,
such a check was counted as one that didn't run.

A check now counts as not run only when it is incomplete and its reported
status is not FAIL, as on the other surfaces. A check that is only
incomplete still reads "didn't run".

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin scan maps each declared skill's results back to the plugin with
_attribute_scan_result, which rewrote file_path and the grouped
occurrences but not skillspector_occurrences. An AE1 finding then had
file_path skills/perl-helper/SKILL.md while its reference lines still
named SKILL.md, so the exported lines did not match the finding's own
path, as they do for a folder of skills.

The reference lines now get the member directory like the other paths.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n reference lines

The tier1 docs and the unreleased CHANGELOG entries now say that the hook
gate failure keeps the check FAIL beside another gap also when a --policy
override lowers the Critical, that the compact validate verdict says the
check failed, and that a plugin's AE1 reference lines name the declared
skill's directory.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… beside an incomplete scan

The final box of the compact validate view said that a check with a
blocking finding didn't run when one of its scanners did not complete,
although its detail line, the Tier 1 card and the reports said it failed.
The fix applies to any such check, not only to the hook gate, and the
released behavior had no CHANGELOG line of its own. Add one under Fixed,
and pin the general case with a blocking High finding beside an incomplete
Semgrep scan, next to a check that is only incomplete.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In 0.9.0 the Tier 1 card also counted a check with a blocking finding and
a scanner that did not complete under "didn't run", and its "what to
fix" gave a scanner setup step instead of the check's own error. Only the
final box's detail line and the reports said that the check failed. The
Fixed entry named the box alone, so as release notes it left out that the
card changed too.

Name both surfaces in the entry and the setup step the card gave.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the branch up to date with main. CHANGELOG.md conflicted where main
added entries under Unreleased Fixed; resolve it by taking main's file and
keeping this branch's own Unreleased entries.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert the change that made the final box of the compact validate view
count a check with a confirmed failure beside an incomplete scan as
failed, along with its tests and its CHANGELOG text. The open #394 changes
the same lines and renames the "didn't run" wording to "incomplete", so
this branch keeps only the hook gate fix: the check's reported status, the
reports and the JSON status stay FAIL under a --policy override.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n change

Revert the change that put the declared skill's directory before the
reference lines of a SkillSpector AE1 finding in a plugin scan, along
with its test and its CHANGELOG and docs text. On main no command reaches
that plugin attribution path yet; the open #394 adds the caller, so the
fix belongs with it. This branch keeps only the hook gate fix.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Checked that the hook gate is now marked as a confirmed failure (confirmed_failure in the result metadata) and that the marker survives folder merges, so a --policy override that lowers the hook Critical next to another scan gap still reports FAIL instead of INCOMPLETE. This holds for the single-skill, timeout-row and folder cases, in the JSON export and its reload as a saved run, under the CI publisher consistency rules and in the Markdown and terminal views. The new tests fail on main's source and pass on this head, and the flag is never set for the residual incomplete-analysis gate alone or for untrusted reports.

No findings.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is needed, though it is a small fix. When a --policy override lowers the hook Critical and some other gap marks the scan incomplete (a hook with a "timeout" key is enough on 2.13.4), current main reports the security check as INCOMPLETE. The JSON status says incomplete too, and the terminal summary says the check didn't run and suggests skipping it, even though the unwaivable hook gate failure is still there. I reproduced that on main, and the five new tests fail there and pass on this branch.

Setting confirmed_failure on the hook gate and keeping it in merge_with_prefix is the right size of change. It leaves the other gate failures alone, and the scan stays recorded as incomplete, so publication eligibility is unchanged. The exit code is non-zero either way, so this fixes the label and the advice, not a gate hole. It does not overlap #459's summary fix, and #564 touches different functions in the same file. The earlier Windows Tier 2 failure is gone and CI is green, the branch merges cleanly with main, and the description now states the one known gap: the compact validate verdict can still say the check didn't run until that headline follows the reported status.

Looks good to merge, with squash since the branch has revert commits. One optional addition: an assertion for the interactive summary in the override case (it counts '1 failed' now, but the scanners row still says SkillSpector didn't run). I could not run the Tier 3 tests that need the newer Harbor here; the validator and reporting tests I ran pass.

rng1995 and others added 7 commits November 14, 2026 21:43
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n incomplete scan

A check that failed beside an incomplete scan, such as a hook gate failure
next to a SkillSpector parse-limit row or a missing reference, listed only
its first gate failure in the terminal Tier 1 summary. That is often the
error for the gap, so the "what to fix" line hid the hook gate failure that
keeps the check failed. For such a check the line now names every gate
failure. A check whose scan is complete still shows its first error.

The hook surface tests now check the summary wherever a hook gate fails
beside an incomplete scan, with and without a --policy override: the check
is counted under failed, not as a check that did not run, no --skip is
suggested, and the fix line names the hook gate failure.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en/fix-tier1-hook-gate-followups

This brings in main e9ea45c, which cb6d894 merged.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…override

The tests for the hook gate under a --policy override checked the run status
and the JSON report but not the Tier 1 terminal summary. Check there that the
check is counted as failed, not as one that did not run, that no scanner
install or --skip advice is given, and that the "what to fix" item is one of
the result's gate failures. This covers a complete scan, an incomplete scan
with a parse-limit row, and a folder scan.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia

Copy link
Copy Markdown
Collaborator

Review follow-up on 78a6ae089d7e.

No new source defect confirmed. The prior hook-failure/policy interaction is fixed in current source: 125 reporting/hook-surface tests pass. A real CLI run with SkillSpector 2.13.4, hook timeout metadata and a policy downgrading the unverified hook payload to LOW still exits 1 and reports a failed check alongside incomplete publication evidence, as intended. Scanner-row/headline wording is explicitly left to #624. Current Python 3.12 CI fails in the unchanged model-catalog wall-clock deadline test (headers, 1.1185 seconds versus <0.3); this pass did not reproduce it on pristine base, so it is not established as flaky. Please reconcile that failure before readiness.

rng1995 and others added 6 commits November 16, 2026 03:01
…lowups

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A check that failed beside an incomplete scan, such as a hook gate failure
next to a SkillSpector parse-limit row or a missing reference, showed only
its first gate failure in the "what to fix" section of the terminal Tier 1
summary. That first failure is often the error for the gap, so the section
hid the hook gate failure that keeps the check failed.

The section now also lists the other gate failures of such a check, after
the items it already showed: the check's first gate failure and the
unresolved file reference item stay first and in the same order, so the
hook gate failure follows them instead of replacing them. A check whose scan
is complete is listed as before.

This replaces the earlier change that joined every gate failure into one
line. The hook surface tests check, wherever a hook gate fails beside an
incomplete scan, that the first item is still the first gate failure, that
an unresolved reference keeps its item next, and that the hook gate failure
is listed. The summary counts and advice for a hook gate under a --policy
override are checked by the existing terminal summary helper, so the
duplicate checks are removed.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rng1995 and others added 2 commits November 16, 2026 06:30
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rng1995
rng1995 merged commit aeb3dbb into main Nov 16, 2026
28 checks passed
@rng1995
rng1995 deleted the naren/fix-tier1-hook-gate-followups branch November 16, 2026 17:06
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