-
Notifications
You must be signed in to change notification settings - Fork 31
feat(ci): dead-code detection gate — knip + no-unused-vars + vulture (#282) #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
krokoko
merged 10 commits into
aws-samples:main
from
ClintEastman02:feat/282-dead-code-detection-gate
Jul 1, 2026
+718
−55
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
80afbfb
feat(ci): dead-code detection gate — knip + no-unused-vars + vulture …
0aa45a4
Merge branch 'main' into feat/282-dead-code-detection-gate
ClintEastman02 62ecbd7
fix(agent): exclude vulture allowlist from ty typecheck (#282)
ea6d75a
chore(ci): ratchet dead-code baseline 79 → 78 after main merge (#282)
384efa8
fix(cdk): restore exhaustiveness guard + correct knip ratchet keys (#…
e02e36f
Merge branch 'main' into feat/282-dead-code-detection-gate
krokoko 68df6c8
Merge branch 'main' into feat/282-dead-code-detection-gate
krokoko 9e57b44
chore(ci): harden dead-code ratchet + comment accuracy (#282 review n…
b895999
Merge branch 'main' into feat/282-dead-code-detection-gate
krokoko a50bc96
refactor(ci): move dead-code job to its own workflow + use uv run for…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Vulture allowlist (issue #282, cairn MVG gate #6). | ||
| # | ||
| # Names here are reported by vulture as unused but are intentionally kept. | ||
| # vulture "uses" every attribute access in this file, so listing a name | ||
| # suppresses its finding. Only entries that fire at `--min-confidence 80` | ||
| # (the CI threshold) belong here — lower-confidence noise (Pydantic | ||
| # `model_config`, FastAPI route handlers, dynamically-dispatched methods) | ||
| # is below the threshold and must NOT be blanket-allowlisted, so that real | ||
| # dead code in those forms still surfaces. | ||
| # | ||
| # Regenerate/extend (then hand-review the diff): | ||
| # cd agent && uvx vulture src --make-whitelist | ||
| # | ||
| # Keep this list MINIMAL. Prefer deleting dead code over allowlisting it. | ||
|
|
||
| # claude-agent-sdk invokes hooks positionally as | ||
| # (hook_input, tool_use_id, hook_context). The dispatcher in hooks.py passes | ||
| # its own `ctx`, so the `hook_context` positional is part of the required | ||
| # signature but unread in these three hook bodies. Cannot be removed without | ||
| # breaking the SDK calling convention. | ||
| hook_context # unused variable (src/hooks.py:132) | ||
| hook_context # unused variable (src/hooks.py:918) | ||
| hook_context # unused variable (src/hooks.py:1258) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "count": 78, | ||
| "comment": "Dead-code ratchet baseline for issue #282 (cairn MVG gate #6). This is the knip issue count at the time the gate was introduced — pre-existing unused exports/types that are out of scope to remove in the gate PR. The ratchet (scripts/check-deadcode-ratchet.mjs) fails the build only if the count rises above this number. When dead code is removed and the count drops, lower this value in the same PR to lock in the gain. Per-category false positives belong in knip.json, not here." | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.