Repository navigation
Consolidate ui, auth and admin into the monorepo - #177
Merged
Merged
Conversation
* Implement operator-owned authentication service and extension * Install explicitly supplied local peers in source packaging * Align generated service registration mode with closed starter * Add bounded activity metrics and atomic bulk administration * Enforce restricted verification and MFA enrollment with operator presets * Add approved configuration migration and complete semantic UI localization * Add verification-first signup and cancellable email factor recovery * Add independent passkey MFA, revocable device trust and deployment checks * Build recovery, administration, abuse controls and localized auth flows
* Implement permission-gated administration extension and setup CLI * Resolve local auth declarations during development * Install explicitly supplied local peers in source packaging * Add admin activity reports, audited exports and atomic bulk workflows * Localize admin copy with account language precedence and escaped catalogues * Add bounded permission-gated operator health observations * Export complete bounded audit ranges with continuing authorization checks * Prepare bounded internal recovery review and delivery helpers * Build complete administration workflows, reporting and support surfaces
Build portable shared UI for core and extensions
Keep auth theme compatibility in the auth package
…, shadcn theme, project overrides, the ui extension and CLI Builds on the merged extraction without changing its exports. Adds a logic-free template language with enforced escaping and bounded rendering; fourteen partials in shadcn/ui markup with declared view models; a static stylesheet on shadcn/ui variables with light and dark values and two nonce-bound scripts; a theme block validated against a narrow grammar; the kit with project, extension and kit override order, complete pages with CSP and security headers, and a doctor report; additive has, formatDate, formatNumber, english, defaultLocale and coverage on the presentation; and a Node-only ./host entry with the ui runtime extension owning extensions.ui, reading bounded project files and serving hashed assets, plus the urlcode-ui CLI. The host entry mirrors the runtime's extension contract structurally so the package keeps no dependency. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
* Integrate support banners and runtime health in an admin host constructor * Normalize host request headers before support-session checks * Share UI primitives and verify sequential clean-project onboarding * Pin shared UI boundary and verify upgrade session continuity
Add the kit beside the shared primitives: templates, partials, theme, overrides, the ui extension and CLI
…s risk (#37) Routing: urlcode-docs is being retired, but this repository still pointed at it from the AGENTS.md issue-routing table, from a section declaring it "the documentation home for the whole project", and — worst — from .github/ISSUE_TEMPLATE/config.yml, where GitHub renders a contact link as a live button on the new-issue page that will 404. Documentation for this package is authored here, and runtime documentation in core's docs/. Security framing: docs/SPIKE-UI.md called this kit "the only one with no security surface". That is contradicted by this repository's own SECURITY.md, whose first line is "Presentation is a security boundary: escaping, URL handling and script construction can affect account safety", and by the whole of THREAT-MODEL.md. The sentence's real point was that the kit has the narrowest dependencies and can therefore be built first, which it still says — but as written it told a reviewer that escaping, href, CSP and nonce changes here do not need the scrutiny that auth changes get, which is exactly backwards for the package that owns escaping. Stale capability: the same file listed core's capabilities as "redirects, pages, static files, live links, policies, site conventions". Core has no live links; the link store and everything around it were removed when link was extracted, and the packages that received them are retired. Replaced with functions, which core does have. Stale status: llms.txt said "Private and unpublished until reviewed", which contradicts IMPLEMENTATION-STATUS.md ("0.1.0-alpha.5, published to npm as an alpha") and README.md's own `npm install @jimhoyd/urlcode-ui`. An agent reading llms.txt would conclude the package cannot be installed. It now states the real position: published as an alpha, integration review still pending. Co-authored-by: Claude Opus 5 <[email protected]>
`npm ci` fails on main: npm error `npm ci` can only install packages when your package.json and package-lock.json are in sync. npm error Missing: @jimhoyd/[email protected] from lock file npm error Missing: @jimhoyd/[email protected] from lock file ... and 30 more The core peer range was raised to `>=0.4.0-alpha.2 <0.5.0` in package.json without regenerating the lockfile, which still recorded `>=0.4.0-alpha.1` and carried no resolved peer tree at all. npm installs peers by default, so `npm ci` requires that tree to be present and refuses. Regenerated with `npm install --package-lock-only`. The lockfile now records the declared range and resolves @jimhoyd/urlcode 0.4.0-alpha.2 and @jimhoyd/urlcode-ui 0.1.0-alpha.5. Lockfile only; no manifest change. Verified from a clean clone: `npm ci` succeeds, `npm run typecheck` and `npm run build` are clean, and `npm audit` reports 0 vulnerabilities. Co-authored-by: Claude Opus 5 <[email protected]>
…ly runs (#38) test/scaffold.test.ts skipped its only cross-repository assertion behind an absolute path from one developer's machine (/home/user/wt/core-main-admin10), so `npm run verify` reported "pass 56 / skipped 1" while the check that the ui fragment validates as a project document against core never ran anywhere. Resolve core the way the auth and admin workflows link reviewed peers instead: URLCODE_CORE (absolute or repo-relative), else a checkout symlinked into node_modules/@jimhoyd/urlcode, requiring dist/index.js in either case. A test that can only skip is indistinguishable from one that passes, so CI now demands it: peers.json pins the reviewed core revision (d5e8601, the same one auth and admin verify against), verify.yml checks it out, builds it, and runs `npm run verify` with URLCODE_CORE set and URLCODE_REQUIRE_CORE=1, which turns an unresolvable checkout into a failure. Naming URLCODE_CORE is itself a request to run. A plain local `npm run verify` still skips, now with a message saying how to supply core; so do the sibling workflows, which build this package as a peer rather than exercising its own peer matrix. Verified locally against a built core checkout: 57 pass, 0 skipped. Co-authored-by: Claude Opus 5 <[email protected]>
The repository was deleted and @jimhoyd/urlcode-middleware unpublished at 0.1.0-alpha.2 on 2026-09-19. Eleven places still described it as live, and two of them were active instructions that no longer work. The two that mattered most: - AGENTS.md told agents to file per-route middleware issues at urlcode-middleware/issues. That repository is gone, so the row pointed at a 404. It now routes to core, which is where the code actually lives. - docs/OPEN-DECISIONS.md carried an explicit accepted decision: "do not unpublish or retire the middleware package as part of the initial move." It was unpublished and deleted. That reversal is now recorded as a reversal, rather than edited away, so a reader who remembers the instruction can see it was changed deliberately. The distinction worth keeping straight, and stated in each place: this retirement removed no capability. Per-route middleware is native to core via the `middleware:` array; the deleted package only ever offered the same behavior through the extension seam. That is unlike urlcode-short and urlcode-dynamic-link, whose retirement left a real gap agents should report. llms.txt and README now say so explicitly so neither is mistaken for the other. docs/SPIKE-MONOREPO.md drops from five in-scope repositories to four throughout, voids sequencing step 5, and corrects its header: the cleanup PRs it said were open across five repositories have merged, and a fresh survey reports zero open pull requests across all four. VERSION-ALIGNMENT had two present-tense claims about a repository that no longer exists. Also corrected: the note claiming the retirement bundles preserve code but not issues or pull request history. True for the other three; middleware's bundle verifies complete and carries eight refs/pull/* refs alongside captured issue JSON. src/extensions.ts no longer cites the deleted package as a live example in a comment that ships to readers. Co-Authored-By: Claude Opus 5 <[email protected]>
Follows the subtree add of urlcode-ui, which preserved history but left the package sitting inert beside core. This wires it in and, more importantly, makes the enforcing checks actually cover it. The enforcement argument needed code, not just a merge. docs/SPIKE-MONOREPO.md calls the reach of check-trust-model-prose.ts and check-guidance-claims.ts the strongest argument for consolidating. It was overstated. PROJECT_ROOTS matched root-relative prefixes, so packages/ui/src comments were never scanned; EXTRA_FILES was root-only, so packages/ui/llms.txt -- the most agent-facing file the package ships -- was scanned by neither check; and TARGETS was a hardcoded ten-path list that could not reach a package at all. Consolidation alone would have bought Markdown coverage and nothing else. Both scripts now discover workspace packages from disk rather than carrying a list that goes stale the next time a package is folded in or retired. Verified by planting violations in packages/ui/src/kit.ts and packages/ui/llms.txt and confirming a non-zero exit, not by counting files: 417 -> 467 scanned, 10 -> 12 targets. Day-one breakages the plan did not anticipate, all fixed: - Core's `eslint .` reaches packages/ at once, and ui had never been linted. Ten errors: four redundant escapes in the CSP source pattern, six Function types in a test. The regex edit is behavior-identical -- checked differentially over 300k generated inputs plus 23 curated ones, zero mismatches -- because that pattern is a security boundary and "eslint says it is redundant" is not on its own a reason to edit it. - The root eslint ignores were root-anchored, so `dist/**` did not cover packages/ui/dist and generated output got linted. Now `**/`-anchored. - scripts/build-styles.mjs hardcoded a package-local node_modules path that does not exist once npm hoists devDependencies to the workspace root. It resolves the CLI through its package manifest instead. The root verify now runs each workspace's own verify. Without it ui's 57 tests silently stop running the moment it becomes a workspace, which is the failure mode worth guarding: a suite that does not run looks exactly like one that passes. Relatedly, ui's cross-repository test used to skip unless a core checkout was supplied. Core is now the repository root and cannot be absent, so it resolves automatically and is required: 57 pass, 0 skipped, where before it was 57 with that test skipped locally. That is the drift this consolidation exists to remove, made real rather than asserted. peers.json and its tests stay for now. Removing them is entangled with CI consolidation, so both are deferred together rather than left half-done. Changesets is configured with fixed and linked empty, so independent versioning per package is preserved. Core is deliberately outside it: under layout A core is the repository root, not a workspace member. Not done, and outward-facing: CI consolidation, npm trusted-publisher re-registration for @jimhoyd/urlcode-ui, and archiving the source repository. packages/ui/.github is inert where it sits, so ui has no CI in either location until that lands. docs/SPIKE-MONOREPO.md records this under "What has landed", along with a tag-namespace collision the plan never mentions: core and every extension release on tags v*, and their alpha tags overlap outright. Co-Authored-By: Claude Opus 5 <[email protected]>
…joint Core and all three extensions arrived here triggering on tags: ['v*'], and their alpha tags overlap outright -- ui shipped v0.1.0-alpha.2 through -alpha.5, admin v0.1.0-alpha.1 and -alpha.3, auth v0.1.0-alpha.1 through -alpha.3. Across four repositories that was fine. In one repository a single bare tag push starts more than one release workflow. Nothing could mis-publish, since each fails closed on its own tag-matches-manifest check, but a release process where two workflows race and one always errors is not a release process. This blocks every release from the monorepo, core's included, so it is settled before the first tag rather than after. Decided: workspace packages release on Changesets' own <package name>@<version> form; core keeps bare v*. The alternative considered was a prefix scheme (ui-v0.1.0-alpha.6). Both are valid ref names and both are collision-free. Changesets' form wins because `changeset tag` emits it natively, and Changesets is already the chosen release flow -- any other shape means maintaining a translation layer between the tool that computes the version and the tag that triggers the publish, new code whose only purpose is to disagree with a default. The spike chose Changesets partly because it is cheap to get right by hand; hand-rolling the tag shape undercuts that. The two schemes cannot collide because a scoped package name starts with @ and GitHub's v* filter requires a leading v. Verified rather than assumed, including that * does not match / in a filter pattern, so @jimhoyd/urlcode-ui@* matches the version segment only. Core's asymmetry is forced by layout A, not preferred: core is the repository root rather than a workspace member, so Changesets does not manage it and `changeset version` will not bump it. ui's workflow moves onto the new scheme now, including the tag-to-version parsing that assumed a v prefix -- the package name itself contains an @, so it strips through the last one rather than the first. Checked against the real formats: the prerelease dist-tag derivation still yields alpha, a release still yields latest, and a malformed tag is still rejected. scripts/check-release-tags.ts enforces all of it in `npm run check`: a workspace package workflow must trigger on its own <name>@*, nothing but core's may claim v*, and no two filters may match the same tag -- asserted directly rather than inferred from the first two rules, so it survives an edit to them. It parses the workflows with the yaml dependency rather than grepping them. Confirmed it rejects a v* collision, a filter naming a package that does not exist, and an over-broad @jimhoyd/* glob. The reasoning above is exactly the kind of prose that rots the moment auth and admin arrive, which is the argument this repository already makes for enforcing checks over documented intent. Co-Authored-By: Claude Opus 5 <[email protected]>
packages/ui/.github was dead where it sat. GitHub reads workflows, CODEOWNERS, dependabot.yml and issue templates only from the repository root, so ui's copies did nothing after the subtree add -- verification was already covered because core's ci.yml runs the root verify, which now reaches workspaces, but releases were not covered at all. Releases move to .github/workflows/release-ui.yml. The filename is not cosmetic: npm trusted publishing pins the publisher to a repository AND a workflow path, core already owns release.yml, so the name had to change and the npmjs.com entry for @jimhoyd/urlcode-ui must be re-registered against this repository and this exact path before ui can be released from here. Until then the publish step fails closed, which is correct rather than a bug. What changed in the workflow beyond its location: npm ci and verify run at the root, because the root lockfile governs every workspace and a package built against core's working tree is only meaningfully green if core is too; packing goes through --workspace; the manifest reads come from packages/ui; and the tag must name this package specifically, so a mistyped sibling tag cannot release the wrong manifest. Confirmed the packed filename matches what the publish step computes, rather than assuming the scoped-name transform. The three tests that assert against the release workflow now resolve it from the test file rather than the working directory. They encode failures that each cost a pushed tag to find -- the ENOENT pack destination, the npm 11.5.1 floor, the missing dist-tag -- so they were repointed rather than deleted. Verified they still bite by pinning npm back to 10.9.8 and watching the suite fail. peers.json, scripts/peer-revisions.mjs and the workflow that read them are gone. This is mechanics #3, which the previous commit deferred as entangled with CI consolidation; it is no longer entangled because the workflow that consumed the pin no longer exists. ui's cross-repository test resolves core from the repository root instead, so there is nothing left to keep in step. ui had no peers.test.ts, but auth and admin do, and theirs go with the file when they move. Docs and metadata follow the code. ui's cross-repository links are relative now, including docs/SPIKE-UI.md's link to the extension model review, which had been a 404 since 98b5659 archived its target and was broken independently of any of this. The README badge pointed at a workflow in a repository the package has left. package.json's repository, homepage and bugs name this repository with repository.directory set to packages/ui, since those ship to npm. Core's own README, AGENTS, llms.txt and docs/README stop sending readers to jimhoyd-com/urlcode-ui for code that is now in packages/ui -- that drift, in the other direction, is the thing this consolidation exists to stop. Root CODEOWNERS already matched ui's (* @jimhoyd), and Dependabot's npm entry at / covers workspaces from the root, so neither needed changing. Full verify green: core 512/514 with 2 pre-existing skips, ui 57/57 with none. Co-Authored-By: Claude Opus 5 <[email protected]>
Precondition re-verified immediately before the move: zero open PRs, zero open issues. History preserved via subtree add at 71be7b8. The finding worth leading with, because it is a cost of layout A this plan never named: npm resolved auth's @jimhoyd/urlcode peer from the REGISTRY, at the published 0.4.0-alpha.2, rather than from the repository root. Core is the root package, not a workspace member, so npm does not link it as a sibling. Auth would have been built and tested against a published core while sitting next to the real one -- the exact drift this consolidation exists to remove, reintroduced by the consolidation itself, and silently, because everything still passes. The root manifest now carries "overrides": {"@jimhoyd/urlcode": "file:."}, which links core like any other sibling. npm honors overrides only for the top-level project, so this does not reach anyone installing @jimhoyd/urlcode. Layout B would not have had this problem. Admin will need the same treatment and has two peers, not one. With that fixed, auth's 206 tests pass against core's working tree -- 24 commits past the peer revision it had pinned. The pin was stale bookkeeping, not breakage, which is what the plan predicted and is now measured rather than assumed. 204 remain after peers.test.ts went with peers.json. The two trust-model prose violations the audit predicted were both in SPIKE-AUTH.md, and both sat immediately above prose corrections a human had already written. The corrections were right and invisible to the checker; they now carry the marker that makes them machine-readable, which is the whole point of bringing this file inside core's checkout. 41 lint errors, since auth had never been linted. Ten are fixed properly: three empty catch blocks now say which failure they swallow and why it is not the caller's problem, two unused parameters are underscore-prefixed, and four redundant escapes are gone from an email local-part pattern and a hostname pattern -- both input-validation boundaries, so both were differential-tested against their originals over 400k generated inputs plus an exhaustive sweep of every character below U+2000. Zero mismatches. The other 31 are `as any` on `await response.json()`, which is typed unknown, in four HTTP test files asserting the response shapes that are the contract under test. Those are deliberate escapes, not sloppiness, and re-typing them means building typed response helpers for auth's API -- worth doing, but a test-typing project rather than migration work. Carved out for packages/auth/test/** only, with the reasoning in eslint.config.js, so `any` stays an error everywhere else including auth's own src. CI consolidated the same way as ui: .github removed rather than left inert, releases at .github/workflows/release-auth.yml on the per-package tag. Auth's release carries a gate the others lack -- it installs the published peers at the declared range's lower bound and re-runs the suite, which is the invariant urlcode-middleware violated by publishing a range no registry version satisfied. Porting that naively would have inverted it, because the root install symlinks those same peers to this working tree. The published copies go into the package's own node_modules where Node finds them first, and the step now asserts every peer resolved to a real published copy there. A gate that silently tests the working tree is worse than no gate. pack-sources.mjs is deliberately NOT migrated. It is the operator reproducible- build and source-verification path, and the move broke it twice over: it defaulted its reviewed core revision from peers.json, and it rejects source paths that are not distinct, which in a monorepo they never are. No test covers it, so nothing failed. It now throws a message saying exactly that instead of an unexplained ENOENT. What it should assert after consolidation is a question about what operators are able to verify, so it is recorded as a decision in docs/SPIKE-MONOREPO.md rather than answered here. Docs and metadata follow the code, including SPIKE-AUTH.md's link to the extension model review, which had 404ed since 98b5659 archived its target. Co-Authored-By: Claude Opus 5 <[email protected]>
Precondition re-verified immediately before the move: zero open PRs, zero open issues. History preserved via subtree add. Admin was the easy one, as the survey predicted. Its trust-model prose was already correct and needed no markers, and all 69 tests passed against core's working tree despite pinning a revision 24 commits behind. Its peers.json pinned auth and ui as well as core, and those two pins disagreed with auth's own -- the kind of three-way drift that a workspace makes structurally impossible rather than merely unlikely. Seven lint errors, all fixed rather than suppressed except one. Two empty catch blocks now say what they swallow. A thrown symptom error was discarding the real failure; it attaches the original as `cause`, so the stack still says which import failed. Three redundant escapes in test strings are gone -- confirmed the string values are byte-identical, since they were escapes inside single-quoted strings rather than regex literals. The exception is `let runtime` in admin-runtime.ts, which prefer-const flags. It is captured by the health closure built above it and assigned only after createRuntime resolves, so making it const means reordering a trusted host constructor to satisfy a style rule. Disabled on that line with the reason written next to it, which is the honest trade rather than restructuring runtime-critical code. CI consolidated as for the other two: .github removed, release at .github/workflows/release-admin.yml on the per-package tag, with the same floor-install gate rewritten so it installs the published peers into the package's own node_modules and asserts they actually shadowed the workspace symlinks. Admin has three peers rather than auth's two, so the assertion matters more here. Both copies of pack-sources.mjs -- auth's and admin's -- are now deliberately unmigrated and say so when run. Consolidating the two into one is part of the same open decision recorded in docs/SPIKE-MONOREPO.md. Docs and metadata follow the code, including two more links that had 404ed since 98b5659 archived their targets, independently of any migration. That completes the extension moves. What remains is outward-facing and the maintainer's: re-register three npm trusted publishers against the new workflow paths, decide pack-sources, then archive the three source repositories -- archive rather than delete, since unlike the September retirements this code continues to live at a new path and the redirect is the entire point. Co-Authored-By: Claude Opus 5 <[email protected]>
CI caught this; local runs did not, because `npm install` tolerates the lockfile
drift that `npm ci` refuses. The previous commit's
"overrides": {"@jimhoyd/urlcode": "file:."} produced the correct symlink on
disk but wrote a lockfile entry resolving it to packages/auth, so `npm ci`
failed outright with "lock file's @jimhoyd/[email protected] does not
satisfy @jimhoyd/[email protected]". A root self-reference is ambiguous.
Each package that declares core as a peer now devDepends on it as
"file:../..", which names the root unambiguously. The lockfile records a nested
link per package and `npm ci` reproduces it.
That is the second time this has broken silently. The first was npm resolving
the peer from the registry at the published 0.4.0-alpha.2, 24 commits behind
the tree it sat in, with every test still passing against the wrong core. Both
failure modes are invisible to the suites, so scripts/check-workspace-links.ts
now asserts in `npm run check` that every package declaring core as a peer
resolves it to this repository's own package.json. Confirmed it fails when the
devDependency is removed.
Also restores the 20 @typescript/* platform entries that regenerating the
lockfile from scratch had dropped, which broke ui's typescript 7 build on
darwin-arm64. The lockfile is rebuilt incrementally from the committed one
rather than deleted and recreated.
Co-Authored-By: Claude Opus 5 <[email protected]>
All three verify jobs failed on: ../ui/src/styles.ts(1,26): error TS2307: Cannot find module './styles.generated.ts' packages/ui/src/styles.generated.ts is produced by ui's `styles` script and is gitignored. admin and auth reach @jimhoyd/urlcode-ui through the workspace link, which resolves to ui's SOURCE rather than its built output, so tsc follows into ui/src and needs that file. `packages/*` expands alphabetically -- admin, auth, ui -- so both packages that depend on it verify before ui has generated it. This never showed locally because an earlier `npm run build -w packages/ui` had left the file on disk. Reproduced by deleting it, which is what a fresh checkout looks like. Before the move this could not happen: admin and auth resolved ui from a separately built checkout, so the file always existed by the time they ran. Root `verify:workspaces` now runs `workspace:styles` first, and the auth and admin release workflows do the same before their typecheck step, since `npm ci --ignore-scripts` will not produce it either. Verified from a clean state: core 512/514, admin 65, auth 204, ui 57. Co-Authored-By: Claude Opus 5 <[email protected]>
admin's CLI test failed in CI with ERR_MODULE_NOT_FOUND for @jimhoyd/urlcode-auth/dist/index.js: the CLI spawns a subprocess without --conditions=development, so it resolves auth to its BUILT output, and nothing had built auth yet. `npm run verify --workspaces` walks `packages/*` alphabetically -- admin, auth, ui -- which is the reverse of the dependency order. admin depends on auth and ui; auth depends on ui. So both packages that others build on ran last. This is the same root cause as the previous commit's generated-stylesheet failure, which I fixed as a one-off by generating ui's styles first. That was treating a symptom. Ordering the verifies ui -> auth -> admin fixes both, and fixes the next one of these before it happens. The explicit `workspace:styles` step stays in the auth and admin release workflows, which verify a single package and so cannot rely on ui's verify having run. Both earlier failures were invisible locally for the same reason: leftover build output from previous runs. This was verified after `git clean -xdf` and a fresh `npm ci`, which is what CI actually does -- core 512/514, ui 57, auth 204, admin 65, in that order. Co-Authored-By: Claude Opus 5 <[email protected]>
Decided: one scripts/pack-sources.mjs at the root, four repository paths and a peers.json-derived pin replaced by a required --revision. The two copies in packages/auth/scripts and packages/admin/scripts were near-identical and both broken by the move: they defaulted their reviewed core revision from peers.json, which no longer exists, and they rejected source paths for not being distinct, which in a monorepo they never are. The previous commits left them failing loudly rather than patching them, because what they should assert after consolidation is a question about what operators can verify, not a path fix. The answer is that the guarantee gets shorter AND stronger. One commit now identifies core, ui, auth and admin simultaneously; before, an operator checked four revisions and trusted that the peers.json pins agreed with each other. What is given up is building a mix of revisions across packages, which is the drift vector this consolidation exists to remove. Every other guarantee is kept: exact reviewed revision, clean tree, re-checked after each build and pack so a mutation mid-run discards the output, the extension-contract sanity check, per-package integrity metadata, 0700 output directory, a manifest written with the wx flag so it cannot overwrite, and nothing published. One step is deliberately dropped. The old scripts installed each freshly built tarball as the next package's peer, to avoid resolving unpublished peers from a registry. The workspace resolves every sibling to this tree by construction, which is a stronger guarantee than installing tarballs built from it moments earlier, and check-workspace-links.ts enforces it. Also updates the prose that described the old shape: the cross-repository source CI, the URLCODE_AUTH_READ_TOKEN / URLCODE_UI_READ_TOKEN checkout credentials, and the peers.json links in both ACCEPTANCE files. None of that exists any more. Co-Authored-By: Claude Opus 5 <[email protected]>
Found while dry-running the first release. Every package here is on a prerelease version, and outside pre mode a patch changeset against 0.1.0-alpha.5 does not produce 0.1.0-alpha.6 -- it produces 0.1.0. That is a stable version. The release workflows derive the npm dist-tag from the version, so it would publish under `latest` and become what a plain `npm install @jimhoyd/urlcode-ui` resolves to. A published version can never be replaced, so there is no undo. It also contradicts docs/VERSION-ALIGNMENT.md outright: "`latest` deliberately stays on the 0.3.0 Apache-2.0 self-hosted baseline: the 0.4.0 line is a prerelease and must not become the default install." The workflows' safeguard -- a prerelease can only publish under alpha -- is real but cannot help here, because by then the version it is handed is not a prerelease any more. Measured both ways rather than reasoned about: without pre mode the pending ui changeset yields 0.1.0 and a derived dist-tag of `latest`; with it, 0.1.0-alpha.6 and `alpha`. Other packages are untouched either way. .changeset/README.md says why it must stay on, and that leaving it is `changeset pre exit` as a deliberate reviewed act rather than something that happens by forgetting. Co-Authored-By: Claude Opus 5 <[email protected]>
jimhoyd
added a commit
that referenced
this pull request
Sep 19, 2026
First release from the consolidated repository. Versioned by changeset in pre mode, so it publishes under the alpha dist-tag. Corrects the generated changelog's history-preserved claim, which the squash merge of #177 made untrue.
This was referenced Sep 19, 2026
jimhoyd
added a commit
that referenced
this pull request
Sep 19, 2026
The consolidation in #177 moved urlcode-auth, urlcode-admin and urlcode-ui into this repository as packages/auth, packages/admin and packages/ui, but this bullet still told agents they "live in their own repositories". An agent following it would look for a repository that is on its way to being archived, or open a pull request against the wrong place. The rest of the file had already been brought across -- the "File what you find" table routes every extension issue to this repository and names the packages/ paths -- so this bullet was the last stale claim in it. Three things kept, because they are still true and still load-bearing: - The packages consume the generic contract in src/extensions.ts. - Core never imports them. Consolidation made this easier to violate, not less important, so the bullet now says plainly that the dependency stays one-way; `grep` over src/ confirms no package import exists today. - docs/FRAMEWORK.md remains the page describing how the four packages compose. Also records that the packages depending on core resolve it to this checkout rather than the registry, and names scripts/check-workspace-links.ts as what asserts it -- that had already regressed twice during the migration. Not fixed here: docs/FRAMEWORK.md itself still has a per-package "Repository" column, cross-repository IMPLEMENTATION-STATUS.md links, and references to "downstream repositories" and "each repository's README". That is a reader-facing documentation pass rather than a one-line correction, and it is left for its own change. npm run check and npm run lint pass. Co-authored-by: Claude Opus 5 <[email protected]>
This was referenced Sep 20, 2026
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.
Carries out the migration accepted in
docs/SPIKE-MONOREPO.md:urlcode-ui,urlcode-authandurlcode-adminbecome workspace packages underpackages/, with history preserved viagit subtree add(git blameresolves through the move;
git log <new path>does not — see below).Also records
urlcode-middlewareas deleted rather than as migration scope,which is what prompted this branch.
Nothing outward-facing has happened. No repository is archived, no npm
trusted publisher is re-registered, no package is released. Three of the four
release workflows here fail closed until their publisher entries are updated —
correct behavior, not a bug.
State
npm run verifyis green: core 512/514 (2 pre-existing skips), auth 204,admin 65, ui 57 with none skipped. Lint clean.
Three things the plan got wrong
1. Its strongest argument was overstated. "What consolidation would newly
enforce" claimed the enforcing checks would reach the folded-in packages. They
would not have:
check-guidance-claims.tshad a hardcoded ten-path targetlist that could never match anything under
packages/, andcheck-trust-model-prose.tsmatched root-anchored prefixes, so packagesrc/comments and each package's
llms.txtwent unscanned. Consolidation alonebought Markdown coverage and nothing else. Both scripts now discover workspace
packages from disk. Verified by planting violations in
packages/ui/src/kit.tsand
packages/ui/llms.txtand confirming a non-zero exit — not by countingfiles.
2. Layout A silently reintroduces the drift it removes. Core is the
repository root, not a workspace member, so npm does not link it as a sibling:
it resolved auth's
@jimhoyd/urlcodepeer from the registry, at thepublished
0.4.0-alpha.2, 24 commits behind this tree. Auth would have beenbuilt and tested against a published core while sitting next to the real one,
with everything passing. Fixed with
"overrides": {"@jimhoyd/urlcode": "file:."}at the root (npm honors
overridesonly for the top-level project, so thisdoes not reach consumers). Layout B would not have had this problem.
3. A tag-namespace collision it never mentions. Core and all three
extensions triggered on
tags: ['v*'], and their alpha tags overlap outright,so one bare tag push would start several release workflows. Workspace packages
now release on Changesets'
<name>@<version>form; core keepsv*; the twocannot collide because a scoped name starts with
@.scripts/check-release-tags.tsenforces it.Smaller: "21 commits behind" was 24 by the time the move happened, and
git log <new path>shows only the subtree commit (blame is fine, nothing islost — use
git log <old-sha> -- src/...).Judgment calls worth a look in review
range's lower bound and re-runs the suite — the invariant
urlcode-middlewareviolated. A naive port would have inverted it, becausethe root install symlinks those same peers to this working tree. The
published copies now go into the package's own
node_modulesand the stepasserts the shadowing actually took.
pack-sources.mjsis deliberately not migrated, both copies. It is theoperator reproducible-build path, and a monorepo makes its
four-distinct-repositories assumption meaningless. No test covers it, so
nothing failed; it now throws a message saying exactly that instead of an
unexplained ENOENT. Left as an open decision rather than answered quietly.
explicit-
anyerrors in auth's HTTP tests (real escapes aroundjson()'sunknownreturn; follow-up tracked separately), and oneprefer-constinadmin's trusted host constructor where
constwould mean reorderingruntime-critical code for a style rule. Everything else was fixed: 10 in ui,
10 in auth, 6 in admin.
email local-part validator, a hostname validator, all input boundaries.
300–400k generated inputs each plus an exhaustive sweep below U+2000. Zero
mismatches.
peers.json,peer-revisions.mjsand threepeers.test.tsare deleted;the pins they carried cannot drift in a workspace.
Also fixes four documentation links that had 404ed since
98b5659archivedtheir targets, independently of this migration.
Still open after this merges
pack-sources.mjsbecomes (consolidating the two copies ispart of the question).
filenames — the credential pins repository and path, and the names had
to change because core owns
release.yml. (PUBLISH_NPM=trueis alreadyset on this repository.)
here has actually worked.
#172is moot and should be closed.🤖 Generated with Claude Code