Skip to content

chore: remove dead code and tighten the repository's gates - #155

Merged
viztor merged 1 commit into
mainfrom
claude/vigilant-mendel-bctz9n-p1b
Nov 4, 2026
Merged

viztor merged 1 commit into
mainfrom
claude/vigilant-mendel-bctz9n-p1b

Conversation

@viztor

@viztor viztor commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Phase P1b of docs/improvement-plan.md, restacked onto 1.8.1. Supersedes #107, which GitHub closed when its stacked base branch was deleted with #106's merge.

What it does

  • src/adapter-replacement.ts and its test are gone. Nothing in src/ imported it — the map said so and the architecture walk agreed — so it was the next step written down as if it were live behaviour.
  • utils/ is now closed against the clock and the console. The gate forbids fetch, console, and a global timer (called or passed as a value, bare or through globalThis./window./global./self.), and a relative import that resolves outside the folder. utils/retry.ts was the offender: its default sleep reached a global timer and its warning reached console, so it now takes both from the caller (backoffOver(timer), warn).
  • .freebuff/project-id is deleted and the directory ignored. A tool's local project id had been committed; it is not source, and it is not anyone else's business.
  • The test support files moved under test/support/ — catalogs.ts (the synthetic catalogue fixture) and src.ts — so the fixtures a test imports are named as support rather than as a second kind of test.
  • The gates tightened: the lint warnings the tree had been carrying are addressed, and the docs that describe the utils/ rule now describe the rule the test enforces.

Restack note

Rebased the branch's net change onto 1.8.1, then completed the two file moves patch cannot express: the rename test/fixtures/catalogs.ts → test/support/catalogs.ts, and the two adapter-replacement files removed rather than emptied.

Verification

gate result
unit suite 1363 passed / 85 files (+15)
test:mock 52 passed
vp check 0 errors, 21 warnings (was 23)
scripts/check.ts passes
coverage 96.52% statements / 92.54% branches, above the ratchet

Phase **P1b** of `docs/improvement-plan.md`, restacked onto 1.8.1.

- **`src/adapter-replacement.ts` and its test are gone.** Nothing in `src/`
  imported it — the map said so and the architecture walk agreed — so it was the
  next step written down as if it were live behaviour.
- **`utils/` is now closed against the clock and the console.** The gate forbids
  `fetch`, `console`, and a global timer (called or passed as a value, bare or
  through `globalThis.`/`window.`/`global.`/`self.`), and a relative import that
  resolves outside the folder. `utils/retry.ts` was the offender: its default
  `sleep` reached a global timer and its warning reached `console`, so it now
  takes both from the caller (`backoffOver(timer)`, `warn`).
- **`.freebuff/project-id` is deleted and the directory ignored.** A tool's local
  project id had been committed; it is not source, and it is not anyone else's
  business.
- **The test support files moved under `test/support/`** — `catalogs.ts` (the
  synthetic catalogue fixture) and `src.ts` — so the fixtures a test imports are
  named as support rather than as a second kind of test.
- **The gates tightened**: the lint warnings the tree had been carrying are
  addressed, and the docs that describe the `utils/` rule now describe the rule
  the test enforces.

Restacked by rebasing the branch's net change onto 1.8.1, then completing the two
file moves `patch` cannot express (a rename and a deletion): `test/fixtures/
catalogs.ts` → `test/support/catalogs.ts`, and the two `adapter-replacement`
files removed rather than emptied.
@viztor
viztor merged commit 847a159 into main Nov 4, 2026
4 checks passed
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