Skip to content

Commit 949e6be

Browse files
authored
Merge pull request #927 from ddteeter/docs/w16-stale-paths
docs: comments outside the moved modules name their new paths
2 parents e7c9eb1 + c821c0b commit 949e6be

26 files changed

Lines changed: 42 additions & 42 deletions

File tree

‎guardrails.config.json‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"count": 1
5555
},
5656
{
57-
"key": "src/modules/onboarding/starter-list.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- the query is the same read as feed/units.ts's, and the extraction that would merge them does not typecheck (see above); what differs after it is the part that matters, since \"no location\" and \"no unit preference\" are different facts with different right answers",
58-
"reason": "Same two-column read of user_profiles as feed/units.ts's unitsFor, and the extraction into lib/keyed-read provably does not compile: drizzle infers a row type for a literal column map and stops for a generic one, widening select().from().where() to a union that includes the query builder, so the awaited value is neither iterable nor indexable. Four shapes were tried (annotated result, .all(), .execute(), a generic table param) \u2014 the same class of failure CLAUDE.md already records for wrapping createServerFn. What differs after the query is the part that matters: \u201cno location\u201d and \u201cno unit preference\u201d are different facts with different right answers.",
57+
"key": "src/modules/onboarding/starter-list.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- the query is the same read as feed/conditions/units.ts's, and the extraction that would merge them does not typecheck (see above); what differs after it is the part that matters, since \"no location\" and \"no unit preference\" are different facts with different right answers",
58+
"reason": "Same two-column read of user_profiles as feed/conditions/units.ts's unitsFor, and the extraction into lib/keyed-read provably does not compile: drizzle infers a row type for a literal column map and stops for a generic one, widening select().from().where() to a union that includes the query builder, so the awaited value is neither iterable nor indexable. Four shapes were tried (annotated result, .all(), .execute(), a generic table param) \u2014 the same class of failure CLAUDE.md already records for wrapping createServerFn. What differs after the query is the part that matters: \u201cno location\u201d and \u201cno unit preference\u201d are different facts with different right answers.",
5959
"count": 1
6060
},
6161
{
@@ -484,12 +484,12 @@
484484
"count": 1
485485
},
486486
{
487-
"key": "src/modules/onboarding/profile.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- rhymes with feed/share-default.ts's defaultAudienceFor: same select-by-userId-with-limit-1-then-??-default shape, but a different column with a different default (not-yet-onboarded vs public-by-default) that will evolve on its own product timeline",
488-
"reason": "Pair A, both sides. See the matching grant on `modules/feed/share-default.ts`: same skeleton, different column, different default, different module, no shared home. Owner's call, 2026-09-21 (task 115).",
487+
"key": "src/modules/onboarding/profile.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- rhymes with feed/entries/share-default.ts's defaultAudienceFor: same select-by-userId-with-limit-1-then-??-default shape, but a different column with a different default (not-yet-onboarded vs public-by-default) that will evolve on its own product timeline",
488+
"reason": "Pair A, both sides. See the matching grant on `modules/feed/entries/share-default.ts`: same skeleton, different column, different default, different module, no shared home. Owner's call, 2026-09-21 (task 115).",
489489
"count": 1
490490
},
491491
{
492-
"key": "src/modules/closet/components/GarmentForm.tsx|analyzer-ignore|// fallow-ignore-next-line code-duplication -- a ten-prop signature that matches feed/components/KitPicker.tsx KitList only by destructuring one prop per line; one edits a garment, the other picks a kit, and they share nothing to extract",
492+
"key": "src/modules/closet/components/GarmentForm.tsx|analyzer-ignore|// fallow-ignore-next-line code-duplication -- a ten-prop signature that matches feed/attach/components/KitPicker.tsx KitList only by destructuring one prop per line; one edits a garment, the other picks a kit, and they share nothing to extract",
493493
"reason": "Owner's call, 2026-09-25: a destructured-props signature, not a clone. Semantic mode matches any two components that destructure ten-plus props one per line, whatever the names and types, so two unrelated components rhyme. The alternative, reading props through `props.` in one of them to break the skeleton, was put to the owner and declined as code written only to dodge the detector.",
494494
"count": 1
495495
},
@@ -504,7 +504,7 @@
504504
"count": 1
505505
},
506506
{
507-
"key": "src/modules/runs/imports/components/ParsedCard.tsx|analyzer-ignore|// fallow-ignore-next-line code-duplication -- a many-prop signature that matches feed/components/Feed.tsx FollowingTab only by destructuring one prop per line; one is a parsed run, the other the Following tab, and they share nothing to extract",
507+
"key": "src/modules/runs/imports/components/ParsedCard.tsx|analyzer-ignore|// fallow-ignore-next-line code-duplication -- a many-prop signature that matches feed/following/components/Feed.tsx FollowingTab only by destructuring one prop per line; one is a parsed run, the other the Following tab, and they share nothing to extract",
508508
"reason": "Owner's call, 2026-09-25: a destructured-props signature, not a clone. Semantic mode matches any two components that destructure ten-plus props one per line, whatever the names and types, so two unrelated components rhyme. The alternative, reading props through `props.` in one of them to break the skeleton, was put to the owner and declined as code written only to dodge the detector.",
509509
"count": 1
510510
},
@@ -614,8 +614,8 @@
614614
"count": 2
615615
},
616616
{
617-
"key": "src/modules/safety/review/desk-kit.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- fallow 3.34 matches drizzle's select/from/join/where grammar across tables; deskKitFor is the one read of a kit for the Desk, and its pieces already come from kitPiecesSelect, which feed/public-kit.ts shares",
618-
"reason": "Fallow 3.34 (#3491) reads the object a call receives and no longer drops a method chain, so semantic mode matches drizzle query builders over different tables and columns: 34 new clone groups on main. Each was read on both sides; the real copies were extracted in the same PR (runsWithEntry, ownerHandles, recentOwnEntries for prefill and itemBandWearStat), and what remains is the query grammar. fallow-ignore-next-line only covers a clone that starts on the next line and fallow has no block form, so the comment sits where each clone starts. Owner's call, 2026-10-26: fix where possible, suppress the rhymes inline. Owner's call 2026-11-09 (#388): the kit's garment read was extracted (kitPiecesSelect, shared with feed/public-kit.ts); these three are the query grammar.",
617+
"key": "src/modules/safety/review/desk-kit.ts|analyzer-ignore|// fallow-ignore-next-line code-duplication -- fallow 3.34 matches drizzle's select/from/join/where grammar across tables; deskKitFor is the one read of a kit for the Desk, and its pieces already come from kitPiecesSelect, which feed/public-web/public-kit.ts shares",
618+
"reason": "Fallow 3.34 (#3491) reads the object a call receives and no longer drops a method chain, so semantic mode matches drizzle query builders over different tables and columns: 34 new clone groups on main. Each was read on both sides; the real copies were extracted in the same PR (runsWithEntry, ownerHandles, recentOwnEntries for prefill and itemBandWearStat), and what remains is the query grammar. fallow-ignore-next-line only covers a clone that starts on the next line and fallow has no block form, so the comment sits where each clone starts. Owner's call, 2026-10-26: fix where possible, suppress the rhymes inline. Owner's call 2026-11-09 (#388): the kit's garment read was extracted (kitPiecesSelect, shared with feed/public-web/public-kit.ts); these three are the query grammar.",
619619
"count": 3
620620
}
621621
]

‎scripts/check-bundle.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* **Why this check exists at all.** A route is in the client bundle, so what
55
* it imports at module scope has to be reachable without `env` — and when
66
* it is not, almost nothing says so. Pulling one decision out of
7-
* `feed/entries.ts` into a route loader dragged `cloudflare:workers` into
7+
* `feed/entries/entries.ts` into a route loader dragged `cloudflare:workers` into
88
* the browser bundle and broke `npm run build`; a second did the same with
99
* the whole drizzle schema, 23 kB of it, and that one did not fail at all.
1010
* Neither is visible to tsc, to eslint, to dependency-cruiser or to the

‎src/db/schema-core.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import {
4949
* `strangerAudiences` (SHARED or PUBLIC, D-151). The two shared-entry
5050
* indexes are partial on exactly this expression, and SQLite uses a
5151
* partial index only for a query whose WHERE carries the same expression,
52-
* so the stranger rule (`safety/visibility.ts`) and the feed's seek call
52+
* so the stranger rule (`safety/rules/visibility.ts`) and the feed's seek call
5353
* this rather than writing their own. The values are literals, not bound
5454
* parameters, for the same reason: a parameter cannot prove the index's
5555
* condition. They are the contract's own constants, never input.
@@ -76,7 +76,7 @@ export const userProfiles = /*#__PURE__*/ sqliteTable(
7676
userId: text("user_id").primaryKey(),
7777
// The runner's handle (task 126, ACC-1; decision D-41 replaced
7878
// `display_name` with it). Stored lowercased, as the rule types it;
79-
// null until O0. `modules/account/username.ts` is the one writer.
79+
// null until O0. `modules/account/handles/username.ts` is the one writer.
8080
username: text("username"),
8181
cityLabel: text("city_label"),
8282
lat: real("lat"),
@@ -136,7 +136,7 @@ export const userProfiles = /*#__PURE__*/ sqliteTable(
136136
// On by default: published totals count shared and private runs, and
137137
// an opted-out runner leaves them at the next nightly build. It is also
138138
// U2's conditions pool (owner, 2026-10-12): off leaves their shared runs
139-
// out of the in-app Same conditions block at once (`feed/consensus.ts`),
139+
// out of the in-app Same conditions block at once (`feed/consensus/consensus.ts`),
140140
// while the block still works for them. The guide job and consensus read
141141
// it; `onboarding/aggregate-prefs.ts` is the one writer.
142142
countInTotals: integer("count_in_totals", { mode: "boolean" })
@@ -508,7 +508,7 @@ export const inviteCodes = /*#__PURE__*/ sqliteTable(
508508
* two sign-ups racing for a single-use code from both getting it: a row
509509
* counts against the code while its account exists *or* its hold is live,
510510
* so a sign-up that died between the claim and the account frees the
511-
* code when the hold runs out (`modules/account/invites.ts`).
511+
* code when the hold runs out (`modules/account/access/invites.ts`).
512512
*
513513
* **A use is an address, and once made it is permanent.** Uses are
514514
* counted by distinct `email`, so a retried sign-up's second claim is the
@@ -847,7 +847,7 @@ export const wardrobeItems = /*#__PURE__*/ sqliteTable(
847847
// dHash, taken from the upload before it is re-encoded. Written and
848848
// cleared in the same statement as `photo_key`, so it never outlives
849849
// the photo it describes. Read only by the takedown review's copy
850-
// search (`safety/photo-matches.ts`). NULL for a photo uploaded before
850+
// search (`safety/review/photo-matches.ts`). NULL for a photo uploaded before
851851
// it existed, which then matches nothing.
852852
photoFingerprint: text("photo_fingerprint"),
853853
productUrl: text("product_url"),
@@ -972,7 +972,7 @@ export const runs = /*#__PURE__*/ sqliteTable(
972972
* cron clears it on a run that is `pending` again.
973973
* - **Feed's half** (`verdict`, `entry_created_at`, `entry_shared`):
974974
* written in the batch that creates the entry or saves its verdict and
975-
* audience (`feed/entries.ts`), and cleared when the entry is retracted.
975+
* audience (`feed/entries/entries.ts`), and cleared when the entry is retracted.
976976
*
977977
* `judged_feels_like_c` is `judgedFeelsLikeC` in SQL: the coldest hour if
978978
* the run felt cold, the warmest if it felt warm, else the start. A test

‎src/lib/chunked.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Split a list into runs of at most `size`, in order.
33
*
4-
* Pulled out of `feed/conditions.ts`, where the same index loop carried
4+
* Pulled out of `feed/conditions/conditions.ts`, where the same index loop carried
55
* three `Stryker disable` directives — the mutants were unkillable *there*
66
* because chunking only changes what a query **scans**, and the answer is
77
* assembled by matching keys afterwards. Scanned rows are what D1 bills,

‎src/lib/contracts/audience.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const WORLD_AUDIENCE = "world" satisfies WritableAudience;
6161
* it counts in the feed, consensus and "worn by N" like a SHARED one.
6262
* Every read that shows an entry to someone other than its author tests
6363
* for these and nothing else (`safety/rules/visibility.ts`'s one rule,
64-
* `feed/feed.ts`'s index seek), so a `groups` row is hidden from strangers
64+
* `feed/following/feed.ts`'s index seek), so a `groups` row is hidden from strangers
6565
* without anyone having to remember it.
6666
*/
6767
export const strangerAudiences = [

‎src/lib/contracts/temperature.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Pure temperature/precipitation classification and display helpers —
33
* no D1, no env, no bindings. This split exists specifically so route
44
* *components* (which ship to the browser) can use these without pulling
5-
* in modules/feed/conditions.ts's `env`/drizzle-orm imports into the
5+
* in modules/feed/conditions/conditions.ts's `env`/drizzle-orm imports into the
66
* client bundle: Vite/Rolldown must resolve every static import in a
77
* file's module graph before it can tree-shake unused bindings, and
88
* `cloudflare:workers` (imported by src/env/index.ts) has no client-side

‎src/lib/photo-constraints.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* These live in lib/ specifically so a component can import them. Lane 104
66
* re-declared them inside routes/feed/verdict.$entryId.tsx with a comment
7-
* explaining that importing modules/feed/photos.ts would drag D1- and
7+
* explaining that importing modules/feed/entries/photos.ts would drag D1- and
88
* env-touching code into the client bundle. That reason was correct; the
99
* conclusion was not. Pure constants belong in lib/, where both sides can
1010
* reach them and neither owns them.

‎src/lib/sql/fingerprint-distance.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* as SQL (D-142, design 146): what lets a `WHERE` and a `LIMIT` apply to a
44
* Hamming distance SQLite has no operator for. Shared by the takedown
55
* review's copy search (`safety/review/photo-matches.ts`) and the upload's check
6-
* against removed images (`feed/photos.ts`, D-147).
6+
* against removed images (`feed/entries/photos.ts`, D-147).
77
*
88
* Every fingerprint given here is spelt into the SQL, so each caller
99
* parses what it passes through `fingerprintSchema` first.

‎src/modules/closet/components/GarmentForm.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ type UpdateValue = <K extends keyof GarmentFormValues>(
545545
* sentence or the failure band — so the schema is the single gate and
546546
* `useFormSubmit` renders what it says.
547547
*/
548-
// fallow-ignore-next-line code-duplication -- a ten-prop signature that matches feed/components/KitPicker.tsx KitList only by destructuring one prop per line; one edits a garment, the other picks a kit, and they share nothing to extract
548+
// fallow-ignore-next-line code-duplication -- a ten-prop signature that matches feed/attach/components/KitPicker.tsx KitList only by destructuring one prop per line; one edits a garment, the other picks a kit, and they share nothing to extract
549549
export function GarmentForm({
550550
heading,
551551
back,

‎src/modules/dispatch/scheduled.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export async function handleScheduled(
174174
* requests invited or declined 90 days ago (`account/access/answered-requests.ts`).
175175
* **The copyright holds' sweep** (D-130) is `feed`'s, which imports `ops`:
176176
* it restores what a counter-notice saved on its 12th weekday and deletes
177-
* what was held 30 days with none pending (`feed/moderation.ts`).
177+
* what was held 30 days with none pending (`feed/moderation/moderation.ts`).
178178
*
179179
* **The speed digest** (design 165) is ops' own, and a field for the
180180
* digest email's reason: so a test hands in a fake rather than reach the

0 commit comments

Comments
 (0)