Repository navigation
refactor(mocks): name the fake SahajCloud for what it is - #467
Conversation
"wire" (as on the network) was not legible. src/mocks/wire.ts becomes src/mocks/sahajcloud.ts, its fixture export wire becomes sahajCloud, and the docs that named it follow. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The rename is right and the PR should exist: wire.ts named a shape, not a thing, while answerSahajCloud beside it already used the real word. Scope is clean: nine files, every one a caller, nothing added. But it stops half way: WIRE_API_KEY, WIRE_EVENT, wireEventFeature, serveWire and the exported WireAnswer all still carry the word. The ⚠ Wire shape header and docs/testing.md's heading are the other, legitimate sense, and were right to stay.
The outline's "prettier also reflowed a few lines" is 52 of 118 changed lines, 44 in docs/testing.md. Not this PR's fault — prettier/prettier is scoped to **/*.{js,jsx,ts,tsx} (eslint.config.js:56), so no gate has ever checked Markdown and main has drifted. Filed separately.
Findings
- should-fix
src/mocks/sahajcloud.ts:116— four identifiers still carrywireas the module name. Replacements in the thread. - should-fix
src/mocks/sahajcloud.ts:207—WireAnsweris an exported alias with one reader a line below. Streamline: inline it.
What was checked
Read whole on the branch: sahajcloud.ts (230 lines), its spec, playwright.config.ts, tests/browser/fixtures.ts, both browser specs, eslint.config.js.
git grep mocks/wire is empty, so the no-leftover claim holds; git grep -i wire leaves only the shape sense and the five names above. Both titles in registration.spec.ts match main and read as a pair. Every path the body names exists on the branch. No ## Preview link, and .claude/workflow.json on main declares no previewUrl or fixture.
Contracts: contractSync's consumer paths and docs/embedding.md are untouched; the module is test-only.
Streamliner: 1 piece, 1 kept — sahajCloud earns it, since answerSahajCloud routes to it and three specs read it. No dependency added, no question threads.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The module and its fixture export were renamed, but four names still called the fake backend "wire": WIRE_API_KEY, WIRE_EVENT, wireEventFeature and the spec's serveWire. So playwright.config.ts imported WIRE_API_KEY from sahajcloud. The header's "⚠ Wire shape" and docs/testing.md's "The fixtures are wire shape" are the other, right sense — the network shape a fetcher parses — and stay. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYYwfAJAz63CzUU8A6
WireAnswer was exported and read once, in the signature a line below it. Nothing outside the file imported it, and it carried the word the rename retires. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYYwfAJAz63CzUU8A6
|
Both critic threads adopted. Branch was already current with
Body refreshed: the outline claimed Gates: lint, typecheck and the unit lane pass (189 files, 2372 tests — the 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | e6d415b | Nov 25 2026, 04:36 PM |
#476 rewrote tests/browser/navigation.spec.ts: Cambridgeshire now holds one class, so the drill-down is two steps and dismissal is the sheet's own Back button inside the dialog. This branch only renamed the fixture module there. Resolved to main's scenarios with the rename applied: main's three tests and its `backTo` helper, reading `SAHAJCLOUD_EVENT` from `src/mocks/sahajcloud`. `CITY` and the ancestor-strip assertions are gone because main removed the levels they addressed, not because this branch dropped them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWhWJBM1ssxxhXKQyW
#476 replaced the X with the sheet's own Back, dropped the Cambridge level and added a third navigation scenario, leaving the table describing two scenarios under names no spec carries and omitting the third. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWhWJBM1ssxxhXKQyW
|
Merged Every hunk took main's scenarios with the rename applied. Joined one docs fix: Lean gate green — 191 files, 2408 tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
src/mocks/wire.tsis a fake SahajCloud. "Wire" (as on the network) is not legible, so the module, its fixture export and every identifier that named the backend are renamed for what they are. No behaviour change.mainin. feat(nav): Back says where it goes; a place with one class opens it #476 rewrotetests/browser/navigation.spec.ts, so that file is main's three scenarios and itsbackTohelper with this branch's rename applied.docs/testing.md's browser-lane table named two navigation scenarios after the X that feat(nav): Back says where it goes; a place with one class opens it #476 replaced and omitted the third it added.Change outline
src/mocks/wire.ts->src/mocks/sahajcloud.tssrc/mocks/wire.test.ts->src/mocks/sahajcloud.test.tswire->sahajCloudWIRE_API_KEY->SAHAJCLOUD_API_KEY,WIRE_EVENT->SAHAJCLOUD_EVENT,wireEventFeature->eventFeature, the spec'sserveWire->serveSahajCloud(answerSahajCloudandJsonkeep their names)WireAnsweris gone: it was exported and read once, in the signature a line below it, so the type is inlined there⚠ Wire shapein the module header anddocs/testing.md's "The fixtures are wire shape" are the other, right sense — the network shape a fetcher parses — and stayplaywright.config.ts,tests/browser/*,scripts/serve-embed-review.mjs(comment)AGENTS.md,docs/testing.md(prettier also reflowed a few lines there)Test results
.claude/skills/pr-prep/check.sh: lint, typecheck and the unit lane pass — 191 files, 2408 tests, including theModal.focus-openerflake an earlier run hit.pnpm test:browser: 10 passed, after the merge.git grep -nE "WIRE_API_KEY|WIRE_EVENT|wireEventFeature|serveWire|WireAnswer|mocks/wire"shows no leftover.Notes for reviewer
#466 adds
src/mocks/wire-demo.tson top of this module, and it will be renamedsahajcloud-demo.tswhen #466 rebases onto this.🤖 Generated with Claude Code