Skip to content

Commit 1cbe170

Browse files
fullstackjamclaude
andcommitted
chore(harness): fix knip drift signal and drift-to-issue trigger
Two fixes after the first Harness run on main surfaced design bugs: 1. drift-to-issue.yml never fires. Its `if: github.event.workflow_run.conclusion == 'failure'` guard is unreachable, because Harness jobs set `continue-on-error: true`, which makes the workflow conclude `success` even when individual sensors fail. Drop the workflow-level guard and rely on the job-level conclusion loop already inside the Python script — jobs that pass are a silent no-op. 2. knip noise drowned the real signal. Add knip.json that: - Registers SearchModal.svelte as an entry point (loaded via dynamic `await import()` from docs/+layout.svelte, which knip's static analysis can't see). - Ignores `@cloudflare/workers-types` as a type-only transitive pulled in by @sveltejs/adapter-cloudflare. - Disables the noisy "unused exports / types / namespace members" rules (these flag internal API surface and rarely yield real work). With the filter in place, knip surfaced real drift: codemirror and svelte-codemirror-editor were declared but never imported; the raw @codemirror/{view,state,commands} were imported by ShellEditor.svelte but not declared in package.json (working only via transitive resolution); @testing-library/svelte was a devDep with no callers. Removed the unused, added the missing — knip exits clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1b19b18 commit 1cbe170

4 files changed

Lines changed: 28 additions & 240 deletions

File tree

.github/workflows/drift-to-issue.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ permissions:
2222

2323
jobs:
2424
open-or-update-issue:
25-
if: github.event.workflow_run.conclusion == 'failure'
25+
# No workflow-level conclusion check: Harness jobs use
26+
# `continue-on-error: true`, which means the workflow itself concludes
27+
# `success` even when individual sensors fail. We inspect job-level
28+
# conclusions inside the Python loop below — jobs that pass are a no-op.
2629
runs-on: ubuntu-latest
2730
steps:
2831
- uses: actions/checkout@v4

knip.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"entry": ["src/lib/components/SearchModal.svelte!"],
4+
"ignoreDependencies": ["@cloudflare/workers-types"],
5+
"rules": {
6+
"exports": "off",
7+
"types": "off",
8+
"nsExports": "off",
9+
"nsTypes": "off",
10+
"enumMembers": "off",
11+
"classMembers": "off",
12+
"duplicates": "off",
13+
"binaries": "off"
14+
}
15+
}

package-lock.json

Lines changed: 6 additions & 236 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)