Skip to content

chore(seeds): retire the one-shot importers and the atlas sync - #1171

Merged
sydevs-bot merged 13 commits into
mainfrom
claude/chore-1169-retire-seed-importers
Nov 17, 2026
Merged

sydevs-bot merged 13 commits into
mainfrom
claude/chore-1169-retire-seed-importers

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Deletes the eight completed one-shot seed importers and the Atlas sync pipeline, leaving translations, file-transcripts and preview-fixture.
  • Removes refuseDuplicateClass's skipDuplicateClassCheck bypass, whose only writer was the Atlas importer — a joined finding, not listed on the ticket.
  • Moves slugify out of src/lib/utilities/ and beside src/fields/slugField.ts, its one remaining consumer — the reviewer's answer on the lib-boundary thread.
  • Deletes the region half of src/lib/mapbox/geocoder.ts, whose last caller was the Atlas importer — the reviewer's answer on the adversarial review's should-fix.

Change outline

Files — what leaves seeds/

The three surviving scripts are what is still run. Everything else imported a migration that has already happened.

 seeds/
-├── atlas/                      # the importer, the reset, and the whole sync pipeline
-├── storyblok/                  # Path Steps from the Storyblok API
-├── wemeditate/                 # the legacy Rails database, from a committed dump
-├── meditations/                # the legacy meditation library, from a committed dump
-├── meditation-transcripts/     # the library's 126 existing transcripts
-├── tags/                       # UserChoices and MusicTags from Cloudinary
-├── extract-to-json.ts          # regenerated the two dumps from their .bin files
 ├── translations/               # all three translation globals — KEPT
 ├── file-transcripts/           # a transcript for every untranscribed recording — KEPT
 ├── preview-fixture/            # a preview's content — KEPT, #1168 replaces it
 ├── wm-app-translations/
-│   ├── import.ts               # a strict subset of `translations`
 │   ├── data.en.json            # still read by `translations`
 │   └── lexicalConverter.ts     # still read by `translations`
 ├── sy-atlas-translations/      # ten locale files, still read by `translations`
 ├── wm-web-translations/        # still read by `translations`
 └── lib/
-    ├── MediaUploader.ts        # last consumer was a retired importer
-    ├── mediaDownloader.ts      #   ,,
-    ├── tagManager.ts           #   ,,
-    ├── payloadHelpers.ts       #   ,,
-    └── lexicalConverter.ts     # EditorJS → Lexical, for `wemeditate` alone

 scripts/
-└── etl-d1-to-postgres.ts       # the finished D1 → Postgres cutover

Contract — ScriptName, and the five registries keyed on it

ScriptName is the type every registry is total over, so narrowing it is what makes a missed entry a build error rather than a 500.

 seeds/lib/expectedCounts.ts
-  ScriptName = 11 members
+  ScriptName = 'file-transcripts' | 'translations' | 'preview-fixture'
   EXPECTED_COUNTS      Record<ScriptName, …>   # total — tsc catches a gap
   COLLECTION_METADATA  Record<ScriptName, …>   # total — tsc catches a gap
-  FromDataCounts / isFromData                  # only declarer was the atlas manifest
-  verifyCountsForScript(…, override)           # only supplier was the atlas importer
 seeds/lib/BaseImporter.ts
-  getExpectedCounts(): … | null                # the override's one producer
 seeds/lib/dataFiles.ts
   SCRIPT_DATA_FILES    Partial<Record<…>>      # NOT total — pinned by a spec
 seeds/run.ts
   VALID_SCRIPTS        ScriptName[]            # NOT total — pinned by a spec
   SCRIPT_DESCRIPTIONS  Record<ScriptName, …>   # total
 src/app/(payload)/api/seed/[script]/route.ts
   getImporter switch                           # NOT total — pinned by a spec

seed-data-files.spec.ts is what holds the three non-total registries closed, reading run.ts and the route as source text. It keeps doing so.

Behaviour — a bypass with no writer left

 refuseDuplicateClass({ data, operation, originalDoc, req })   src/collections/Events/hooks/
   not a create or an update → pass
-  req.context.skipDuplicateClassCheck → pass      # nothing sets this any more
   update that leaves the class identity alone → pass
   a twin exists → APIError 400

Flow — pnpm seed with nothing named

 pnpm seed                                       seeds/run.ts
-  SCRIPT_RUN_ORDER = tags → wemeditate → meditations → meditation-transcripts
-                     → storyblok → wm-app-translations → atlas
+  SCRIPT_RUN_ORDER = translations
   printUsage / printScripts
-    a hand-written list of scripts, and a derived one
+    scriptLines(), derived from VALID_SCRIPTS + SCRIPT_DESCRIPTIONS by both

Files — exports whose last consumer was a retired importer

Each verified by grep before deleting; none had a remaining caller, in code or in a spec.

 src/plugins/storage/previewIsolation.ts
-  stripPreviewPrefix                  # read by the two meditation-transcripts files
 src/lib/eventQuality/index.ts
-  export { EMAIL_RE, findStaleDates, GENERIC_TITLE_RE, URL_RE }
+  export { URL_RE }                   # the rest are ./checks', by relative import
 seeds/lib/runtime.ts
-  safeBufferFromUint8Array            # read by tags/ and wemeditate/
 seeds/lib/cliParser.ts
-  printUsage                          # run.ts prints its own
 seeds/env.ts
-  STORYBLOK_ACCESS_TOKEN, STORAGE_BASE_URL
-  CLOUDFLARE_R2_ACCESS_KEY_ID, CLOUDFLARE_R2_SECRET_ACCESS_KEY
-  CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_KEY

Behaviour — the geocoder's region half

Reachable only from its own spec once the Atlas importer went. What the event CSV import reads
stays.

 src/lib/mapbox/geocoder.ts
-  geocodeRegion / resolveRegionLocation / geocodeVenue / MANUAL_LOCATION
-  TYPES_BY_LEVEL, FALLBACK_TYPES, the two default radii
-  forwardUrl / forwardFeature / ForwardQuery        # read by nothing else
-  GeocodeRegionArgs, RegionLocation, ResolveRegionLocation*, GeocodeVenueArgs
   geocodeLocation / addressFeatureMapboxId          # src/plugins/eventImport/
   fetchForwardFeature / attemptForward / baseParams # shared — KEPT
 tests/unit/mapbox-geocoder.spec.ts
-  describe geocodeRegion / resolveRegionLocation / a venue …
   describe geocodeLocation                          # KEPT, 558 → 364 lines

MANUAL_LOCATION re-spelled MANUAL_PREFIX, which manualLocation.ts still owns and the admin
picker still reads. #893's permanent-v6 guard survives the cut: the geocodeLocation case
asserting the endpoint and the flag together is what expectPermanentV6 duplicated.

Files — a module moved to its one consumer

src/AGENTS.md rule 4: a src/lib module whose only consumer sits outside src/lib is that
consumer's private helper in the commons. slugify became one here.

-src/lib/utilities/slugify.ts
+src/fields/slugify.ts                 # consumer: src/fields/slugField.ts
 tests/unit/lib-boundary.spec.ts
-  KNOWN_SINGLE_CONSUMER += '@/lib/utilities/slugify'

@/lib/lemonfox/normalize keeps its entry: moving that folder makes @/lib/transcripts/cues
fail the same check, so it is a three-module reshuffle. #1177 holds it, blocked on this ticket.

The verdict on every script that was in VALID_SCRIPTS

Script Verdict Reason
storyblok Retired One-shot import of Path Steps from the Storyblok API. Its token was the only reader of STORYBLOK_ACCESS_TOKEN, now gone from seeds/env.ts, .env.example and docs/environment.md
wemeditate Retired One-shot import of the legacy We Meditate Rails database, from a dump committed beside it
meditations Retired One-shot import of the legacy meditation library, from a dump committed beside it
meditation-transcripts Retired One-shot import of the library's 126 existing transcripts, loaded into production on 2026-10-21. Every recording saved since #1016 is transcribed on save
tags Retired One-shot import of UserChoices and MusicTags from Cloudinary
atlas Retired The final Atlas sync went to production on 2026-11-13 — the owner's call, recorded on the ticket
atlas-reset Retired It exists only to empty a target before an atlas re-sync, so it outlives nothing
pnpm atlas:sync Retired The fetch → build → groom → check pipeline that produced atlas's input
wm-app-translations Retired A strict subset of translations, which writes that same global plus the other two, idempotently. Its directory stays: translations reads its data.en.json and its lexicalConverter.ts, so it now has the data-only shape its two sibling directories already had
translations Kept Still run, and the only way a widget locale becomes selectable: sy-atlas-config.availableLocales refuses a locale whose translations are unpublished (#705). It is also how new English copy reaches a target after a schema change
file-transcripts Kept, in seeds/ The bulk re-request for every recording a target holds without a transcript. It has to run on the target's own server with the target's own vendor key, which is exactly what the seed route gives it — moving it under scripts/ would mean rebuilding that remote-execution path for no gain, while the route stays for the other two anyway
preview-fixture Kept, untouched #1168's to replace

Also retired, as the ticket's §B asks: scripts/etl-d1-to-postgres.ts, the finished D1 → Postgres cutover, and seeds/extract-to-json.ts, which only regenerated the two dumps.

Preview

Nothing here is visible in the admin panel — the value of the preview is that it builds and boots at all, which is the one check that no deleted module is still imported (next.config.ts drops seeds/** from the production trace, so a dangling seed import surfaces at the Railway build, not in CI).

A browser read of that host is sent on to pr-<n>.cloud-preview.sydevelopers.com, behind Cloudflare Access — sign in with GitHub as a sydevs member. The seed routes need an admin session, which the preview's sign-in picker grants.

Data: this repo sets no previewUrl.seed, and no Access service token is present in this session, so the links were not opened and verified from here. CI's own preview-fixture fill is what puts content in the preview.

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, format:check, typecheck, typecheck:tests, pnpm test:unit (270 files, 3697 tests), re-run on the merged tree at ac87eb3
  • Targeted specs: ✓ 33 passed — tests/int/event-imports.int.spec.ts, the live caller of what geocoder.ts keeps. Earlier commits' specs: tests/int/{seed-importer-preload,file-transcripts,meditation-transcripts,events}.int.spec.ts and both seeds/tests/ suites
  • Build: N/A — not run locally by policy; Railway's preview build for this PR is the check
  • Comment lint: ✓ no banned comment added, over every changed file

Manual verification

  1. pnpm seed --help lists exactly translations, file-transcripts, preview-fixture, and says a bare pnpm seed runs translations.
  2. On the preview, GET /api/seed/translations answers with metadata and GET /api/seed/atlas answers 400.
  3. Confirm the owner still wants file-transcripts kept rather than moved under scripts/ — the ticket left that open, and the reason it stays is in the table above.

Notes for reviewer

  • The ticket's §C does not fire. It asks for the seed CLI, the route, seeds/lib, ADMIN_TOKEN handling and isSeedScript to go if nothing is left in VALID_SCRIPTS. Three scripts are left, so all of that stays. feat(preview): load a typed fixture at boot that covers every surface #1168 has no PR yet; whichever of the two lands second does §C.
  • One deliberate departure from the ticket's §B. It lists seeds/sy-atlas-translations/ among "source dumps the retired scripts read". It is not one — translations reads all ten of its locale files, and §A says to keep translations if it is still run. §A's verdict governs, so the directory stays.
  • Two .gitignore lines are kept on purpose. /seeds/atlas/data/ and /seeds/atlas/local/ still hold personal data on a maintainer's machine. Dropping the ignores would surface those files as untracked, one git add . from being committed. The comment above them now says so.
  • .claude/commands/reset-db.md still names a retired script in an example (pnpm seed meditations). .claude/ is a Protected Path, so an unattended session cannot write it; it needs a one-line attended edit.
  • tests/unit/lib-boundary.spec.ts gained one allowlist entry, @/lib/lemonfox/normalize, which lost its second consumer here. That file's header calls the allowlist a backlog that should only shrink, so the entry is the exception and it names why: every module in src/lib/lemonfox/ is reached only from src/jobs/TranscribeRecording/, so rule 4 says move the folder — but @/lib/transcripts/cues is consumed only by lemonfox/normalize.ts and is exempt today solely because that consumer sits inside src/lib, so moving lemonfox/ out makes cues fail the same check. refactor(transcripts): move the Lemonfox readers into their job folder #1177 carries that reshuffle, blocked on this ticket. @/lib/utilities/slugify was the second entry and is gone: the reviewer chose to move the module instead, which fe6487c does.
  • The geocoder should-fix is built, in ac87eb3. The reviewer called it: git history is the archive, and a later region geocoder would be written against whatever replaces Atlas.
  • Review findings declined, each with its reason:
    • Derive VALID_SCRIPTS from SCRIPT_DESCRIPTIONS, and make getImporter a Record rather than a switch. Both are real duplicate spellings, and both are pre-existing rather than introduced here. They edit the exact lines feat(preview): load a typed fixture at boot that covers every surface #1168 also edits, and the two source-text cases in seed-data-files.spec.ts are the only thing holding those registries closed today. They belong with §C.
    • Delete the CLI's pagination driver, BaseImporter's pagination methods, and the unread halves of delays.ts / dataLoader.ts / fileUtils.ts. These are partial deletes of modules that still have live consumers, reaching into a class's members and lib.test.ts — a different operation from the five whole modules deleted here, which had no consumer at all. seeds/AGENTS.md now carries a shortcut: marker naming the surface and its trigger.
    • Make CollectionMetadata.collection required and drop getCountTargets's skip branch. CollectionMetadata is the shape the route returns to the CLI, so narrowing a field is a contract change. Noted in its JSDoc instead, which no longer cites a deleted script's step.
    • subtitlesZodSchema's parse half has no production caller. True, but Subtitles and subtitleCue are still imported by src/lib/transcripts/, so the module is not deletable as it stands. Its comment no longer claims a deleted importer reads it.
    • The two tests/PERF.md rows naming deleted specs. They are dated measurements with a machine recorded against them, so each row keeps its numbers and now says the file is gone.
Detail

Pagination is kept, though no surviving script uses it. preview-fixture declares six collections, all requiresPagination: false, so nothing left sets the flag. The mechanism stays because it is the seed route's and the CLI's, not a per-script feature: POST /api/seed/<script>?collection=&offset=&limit= is still the request shape, and validatePaginationParam still guards it. Removing it belongs with §C.

What tests/unit/seed-pagination.spec.ts stopped asserting. Its script-keyed cases now read preview-fixture's registry instead of tags / wemeditate / meditations / storyblok / atlas. Two cases were dropped outright, because no surviving script has the property they asserted: "marks large collections as requiring pagination" and "identifies collections with file uploads". So was getCountTargets's "drops a step that lands in no collection of its own" — that branch existed for the Atlas pictures step, which uploaded into images and so could claim no floor. The branch itself is kept; nothing in the registry exercises it any more.

Four of its cases were watched failing against the real defect, by reintroducing each and running the file:

Defect reintroduced The case that caught it
min(offset + limit, floor) → min(limit, floor) adjusts for an intermediate batch — the offset counts too
countWhere's pending → accepted carries the filter a floor is stated under
a step's dependencies naming no step lists every step after the steps it depends on
getCountTargets reversing its steps keeps the script metadata order

The first three were holes the first draft of this spec had: it compared each value against the registry it came from, so all three mutations stayed green. They are now literals, or named before they are indexed.

No migration. Nothing under src/ changed shape: the route lost importer cases, one hook lost an early return, one storage helper and three barrel re-exports lost their last consumer, one module changed folder, and the rest is comments. pnpm db:migrations:create was therefore not run.

The security review found nothing. It read the three paths securityReview.triggerPattern matched — the seed route, refuseDuplicateClass, queueTranscription — plus the .env edits, and confirmed: the route's unknown-script rejection and admin gate are untouched, losing verifyCountsForScript's override removed an unreachable branch rather than a check, nothing sets skipDuplicateClassCheck any more, and no secret was ever committed to the three files whose Storyblok lines went. The slugify move and the geocoder.ts deletion touch no path that pattern matches.

Closes #1169

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mg9rjWiybcQknBjbkLzcBU

The content migrations are complete — the legacy We Meditate database,
Storyblok, the meditation library, Cloudinary tags — and the Atlas sync's
final run went to production on 2026-11-13. Their importers can only
re-run a migration that has already happened, so they are deleted rather
than left to rot against a schema they no longer match.

Retired: storyblok, wemeditate, meditations, meditation-transcripts,
tags, atlas, atlas-reset, and `pnpm atlas:sync`. Also
`scripts/etl-d1-to-postgres.ts` (the finished D1 → Postgres cutover) and
`seeds/extract-to-json.ts`, which only regenerated the two data dumps.

`wm-app-translations` goes too, as a strict subset of `translations`,
which writes the same global plus the other two. Its directory stays,
holding the seed data and the converter `translations` reads — the shape
`wm-web-translations/` and `sy-atlas-translations/` already have.

Kept: `translations`, the only way to publish an atlas locale
(`availableLocales` refuses an unpublished one), and `file-transcripts`,
the bulk re-request for any recording the target holds without a
transcript — which has to run on the target's own server, with its own
vendor key, so the seed route is what runs it. `preview-fixture` stays
until #1168 replaces it.

`seeds/lib` loses the five modules whose last consumer was a retired
importer, and `EXPECTED_COUNTS` loses the from-data floors, whose only
declarer was the Atlas manifest.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWiybcQknBjbkLzcBU
`seeds/AGENTS.md` and `seeds/lib/AGENTS.md` documented the migrations in
full — the Atlas sync pipeline, the transcript corpus's provenance, the
Rails and Storyblok dumps — none of which has a reader any more.

Every pointer elsewhere that named a deleted path is re-stated without
it, keeping the rule each one carried: the trash-aware existence check,
the `availableLocales` partial-write rule, the D1 history footnote, the
smoke spec's warning about where a Vimeo id comes from.

`refuseDuplicateClass`'s `skipDuplicateClassCheck` bypass goes with them.
The Atlas importer was its only writer, so what is left is an unreachable
way past a duplicate-class refusal.

`.claude/commands/reset-db.md` still names a retired script in an
example. It is a Protected Path, so it needs an attended edit.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWiybcQknBjbkLzcBU
Five review passes over the branch. What they caught:

Residue the first two commits missed — the seed route's own `Scripts:`
header, `src/AGENTS.md`'s and `src/types/AGENTS.md`'s examples, the
`.railwayignore` rule for two deleted dumps, the `slugify` JSDoc clause
this PR falsified, and eight comments citing the deleted
`seeds/lib/lexicalConverter.ts`. Each now states the substance it was
pointing at, so it stands with its link cut.

Code whose last consumer this PR deleted: `safeBufferFromUint8Array`,
`stripPreviewPrefix`, `cliParser.printUsage`, four unread Cloudflare keys
in `seeds/env.ts`, and three of the four names on `eventQuality`'s
heuristics barrel line.

Three holes in the rewritten `seed-pagination` spec, each proved by
reintroducing the defect and watching the case fail: nothing pinned the
`offset` term of `min(offset + limit, floor)`; the registration floor's
filter was compared against the registry it came from, so flipping
`pending` to `accepted` stayed green; and a dependency naming no step
passed, because `indexOf` answers -1 and -1 precedes every index.

`seeds/lib` keeps a media and retry surface nothing calls — its fate is
the seed CLI's, under #1169 §C. Both guides now say so instead of
presenting it as the way to do things.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWiybcQknBjbkLzcBU
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1171 November 16, 2026 17:23 Destroyed
@railway-app

railway-app Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1171 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Nov 17, 2026 at 4:54 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 question for the reviewer, one per thread.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread tests/unit/lib-boundary.spec.ts Resolved
@sydevs-bot

sydevs-bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 16:42Z resolve-conflicts · attempt 1 · session · done
  • 16:42Z resolve-conflicts · attempt 1 · session
  • 00:40Z resolve-conflicts · attempt 1 · session · done
  • 00:40Z resolve-conflicts · attempt 1 · session
  • 22:59Z address-review · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 16, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 16, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

The shape is right: 69k deletions against 387 insertions, with no new abstraction. §C correctly does not fire, the §B departure on sy-atlas-translations/ is argued from §A, and skipDuplicateClassCheck is genuinely joined — its only writer was the deleted importer.

One thing is left standing. src/lib/mapbox/geocoder.ts is now half dead: geocodeRegion, resolveRegionLocation, geocodeVenue and MANUAL_LOCATION are reachable only from their own 558-line spec. The body flags it and asks. Delete it here. It is the migration artifact the ticket retires, git history is the archive, a later region geocoder would be written against whatever replaces Atlas, and MANUAL_LOCATION only re-spells the live MANUAL_PREFIX.

Findings

  • should-fix — src/lib/mapbox/geocoder.ts:56,225,269,483: ~250 of 496 lines orphaned. No inline thread; the file is outside the diff.
  • consider — .env.example:214: stale R2 block.
  • consider — tests/unit/seed-pagination.spec.ts:17: header contradicts two of its own cases.
  • consider — src/app/(payload)/api/seed/[script]/route.ts:47: breadcrumb names nothing.

What was checked

  • Every removed export grepped across the branch — stripPreviewPrefix, safeBufferFromUint8Array, cliParser.printUsage, skipDuplicateClassCheck, isFromData, atlasDataFile — no consumer left.
  • seeds/env.ts's four Cloudflare keys were already owned by src/lib/env/server.ts:156 and requireEnv.
  • /api/health answers 200 at commit 71e4245, so Railway boots without the deleted modules. The seed links 302 to the Access-gated host, which this session cannot pass.
  • Ladder: the new pieces are scriptLines(), two KNOWN_SINGLE_CONSUMER entries and a shortcut: marker. The allowlist grew against its own header, but each entry names why its move is a separate reshuffle.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread .env.example Resolved
Comment thread tests/unit/seed-pagination.spec.ts Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 16, 2026
…ire-seed-importers

# Conflicts:
#	seeds/AGENTS.md
#	seeds/lib/AGENTS.md
The block named reset-storage, `pnpm reset:prod` and `pnpm reset:all`, none
of which exist, and two variables nothing reads: the cleanup script derives
its R2 pair from CLOUDFLARE_API_KEY (docs/rules/storage.md). The same two
names leave seeds/env.ts four lines above in this PR, so the file otherwise
gave two answers to one question.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWWJrnYTcLqWtGNwjJ
Two cases pin a literal on purpose — the users batch at line 150 and the
user-submissions filter — because reading the value back from the registry
it came from passes against the mutation each case exists to catch. The
header claimed every case reads the registry, so a fresh reader met the rule
first and the exceptions later.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWWJrnYTcLqWtGNwjJ
`the way one of them first was` pointed at atlas-reset, which this PR
deletes, so a fresh reader has nothing left to check it against. The first
clause already carries the why.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWWJrnYTcLqWtGNwjJ
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Three review threads adopted, base merged, pushed as e72ac81.

main merged in (adce850), since GitHub reported the PR conflicting. Both conflicts had one shape: #1172 deleted the file trees in seeds/AGENTS.md and seeds/lib/AGENTS.md, this branch had updated them. Took #1172's deletion. seeds/lib's step 6 stays dropped — a new script needs no package.json entry.

The geocoder should-fix is still yours. resolveRegionLocation, geocodeRegion, geocodeVenue and MANUAL_LOCATION are reached only from their spec — confirmed. Whether ~250 lines of region geocoding is wanted again is a product call. Say delete and it goes in a commit here.

Lean gate green on the merged tree, plus the seed preload int spec.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 16, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 16, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review November 16, 2026 18:18
@sydevs-bot
sydevs-bot requested a review from Ardnived November 16, 2026 18:18
@sydevs-bot
sydevs-bot enabled auto-merge November 16, 2026 18:18
@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 16, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 16, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 16, 2026
sydevs-bot and others added 2 commits November 16, 2026 23:01
`geocodeRegion`, `resolveRegionLocation`, `geocodeVenue` and
`MANUAL_LOCATION` were reachable only from their own spec once the Atlas
importer went. With them go the internals nothing else read —
`TYPES_BY_LEVEL`, `FALLBACK_TYPES`, the two default radii, `forwardUrl`,
`forwardFeature` and the region/venue argument types — and the spec cases
that only covered them.

What the running app imports stays: `geocodeLocation`,
`addressFeatureMapboxId` and their types, read by the event CSV import.
#893's permanent-v6 guard is still pinned, by the `geocodeLocation` case
that asserts the endpoint and the flag together.

The file header, `ForwardAnswer`, `baseParams` and `GeocodedLocation` each
described the deleted half, as did the `searchTypesByValue` comment in
`Regions.ts`, which named `TYPES_BY_LEVEL` and `geocodeVenue` as its twin.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXkqkZx36mfKN94ptW
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1171 November 16, 2026 23:08 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Geocoder dead code deleted, pushed as ac87eb3.

Gone with the four named functions: TYPES_BY_LEVEL, FALLBACK_TYPES, the two default radii, forwardUrl, forwardFeature and the region/venue argument types — nothing else read them. geocoder.ts 496 → 274 lines, its spec 558 → 364.

Kept, because the event CSV import reads them: geocodeLocation, addressFeatureMapboxId and their types, plus the shared fetchForwardFeature / attemptForward / baseParams. MANUAL_PREFIX in manualLocation.ts is untouched — the admin picker still writes it.

Five comments described the deleted half: the file header, ForwardAnswer, baseParams and GeocodedLocation, plus searchTypesByValue in Regions.ts, which named TYPES_BY_LEVEL and geocodeVenue as its twin. Each now describes what is left.

main merged in (c8d437a), clean, no conflicts.

PR body refreshed — it listed this finding as declined.

Lean gate green: 270 files, 3697 tests. Plus event-imports.int.spec.ts, 33 passed — the live caller.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 16, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 16, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 17, 2026
One conflict, in seeds/meditations/import.ts. #1176 rewrote its bare
`seeds/env` specifier as relative, because TypeScript 6 dropped tsconfig
baseUrl. This branch retires that importer, so the deletion stands: the
rewrite has nothing left to apply to, and no bare `seeds/` specifier
survives anywhere in the merged tree.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjViXHyBCzw9pvSLoQS
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1171 November 17, 2026 00:45 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in at b6f5a90. One conflict, in seeds/meditations/import.ts: #1176 rewrote its bare seeds/env specifier to ../env when TypeScript 6 dropped tsconfig baseUrl, while this branch retires that importer. The deletion stands — the rewrite has nothing left to apply to, and no bare seeds/ specifier survives anywhere in the merged tree.

Lean gate re-run on the merged tree: 271 files, 3704 tests green, on Payload 3.93 / Vitest 5 / TypeScript 6 as main now pins them. tests/int/seed-importer-preload.int.spec.ts green, 9 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 17, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 17, 2026
#1181 landed #1168's half of the split: the app loads `src/fixture/` at boot,
so the `preview-fixture` seed is retired on `main` while this branch retires
the other eight. Every hunk takes the union of the two retirements.

`ScriptName` is now `translations | file-transcripts`. §C of #1169 still does
not fire — two scripts remain, so the seed CLI, the route and `seeds/lib` stay.

`tests/unit/seed-pagination.spec.ts` loses its floor-arithmetic and
dependency-ordering cases. They read `preview-fixture`'s registry, the last one
declaring collections, and `verifyCountsForScript` takes its floors from
`EXPECTED_COUNTS` by script name with no seam to inject a fixture. What is left
are the registry-wide invariants, which hold over an empty registry.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWn29rtkBez9tWZGZe
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1171 November 17, 2026 16:51 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main. #1181 landed #1168's half, so preview-fixture is retired there while this branch retires the other eight. Every hunk takes the union of both retirements, and ScriptName is now translations | file-transcripts.

§C still does not fire: two scripts remain, so the seed CLI, the route and seeds/lib stay.

One resolution worth a look. tests/unit/seed-pagination.spec.ts loses its floor-arithmetic and dependency-ordering cases. They read preview-fixture's registry — the last one declaring collections — and verifyCountsForScript takes its floors from EXPECTED_COUNTS by script name, with no seam to inject a fixture. The registry-wide invariants are what is left.

⚠ The PR body above still names preview-fixture as kept. Read it as stale from here.

Lean gate green on the merged tree, plus seed-importer-preload, wm-web-translations-seed, file-transcripts and atlas-translations-import — 48 passed.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 17, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 0da20ea Nov 17, 2026
15 checks passed
@sydevs-bot
sydevs-bot deleted the claude/chore-1169-retire-seed-importers branch November 17, 2026 17:24
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 17, 2026

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1171 — 65dfda68 Deployed Nov 17, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

chore(seeds): retire the one-shot importers and the atlas sync

3 participants