Repository navigation
chore: remove dead code and tighten the repository's gates - #155
Merged
Merged
Conversation
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.tsand its test are gone. Nothing insrc/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 forbidsfetch,console, and a global timer (called or passed as a value, bare or throughglobalThis./window./global./self.), and a relative import that resolves outside the folder.utils/retry.tswas the offender: its defaultsleepreached a global timer and its warning reachedconsole, so it now takes both from the caller (backoffOver(timer),warn)..freebuff/project-idis 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.test/support/—catalogs.ts(the synthetic catalogue fixture) andsrc.ts— so the fixtures a test imports are named as support rather than as a second kind of test.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
patchcannot express: the renametest/fixtures/catalogs.ts→test/support/catalogs.ts, and the twoadapter-replacementfiles removed rather than emptied.Verification
test:mockvp checkscripts/check.ts