[MIGRATION] META-240 — extract producer and DataHub shim into workspacejson/cli - #1
Merged
Merged
Conversation
Completes the extraction of the CLI slice from workspace-json/agents-audit@e47eb1b into workspacejson/cli. Package history was preserved by git filter-repo; this commit adds the repository-specific root the split requires. Both CLI packages remain distinct and unchanged in identity: packages/agents-audit/ agents-audit@0.4.4, public, bin `agents-audit`, contains the real workspace.json generator packages/cli/ @workspacejson/cli@0.0.1, private:true, dbt/DataHub join shim — NOT the generator No package renamed, no public command changed, nothing published. Dependency resolution - @workspacejson/spec and @workspacejson/rules move from `workspace:*` to the registry pin `0.4.4`. This reproduces the exact dependency bytes pnpm already wrote into the published agents-audit@0.4.4 tarball, so packed output is unchanged. - repository/bugs metadata repointed at the new owner. Adaptations forced by the split (each documented in migration/PROVENANCE.md) - tsconfig.base.json: drop the `@workspacejson/rules -> packages/rules/src` path alias; that directory now lives in workspacejson/standard. - scripts/verify-package-tarball.mjs: the smoke test packed `../rules` and `../spec` off disk. Those are no longer siblings, so it now resolves them the way a consumer does, with WORKSPACEJSON_STANDARD_TARBALLS for pre-publication candidates. Its fixed-group assertion becomes an exact-pin assertion. - scripts/verify-published.mjs: verifies only agents-audit. This repository has no standing to verify packages it does not publish. - package-metadata.test.ts: spec/rules assertions removed; they move with those packages under META-239. agents-audit assertions retained and extended. - packages/agents-audit: add explicit @types/node devDependency. The monorepo build resolved @workspacejson/rules to source through the tsconfig path alias, which transitively pulled @types/node into the program and supplied node:crypto, fs.realpathSync and fs/promises.{rename,unlink}. Against the published rules declarations that leak is gone, so the type environment is now declared instead of inherited by accident. types/ambient.d.ts is unchanged from the frozen source. Publishing is disabled - .github/workflows/release.yml has no enabled trigger, requests no publish permission, holds no credential, and contains no publish step. - This repository has no NPM_TOKEN secret. - workspace-json/agents-audit remains sole publisher until META-243. Guards (scripts/check-architecture.mjs, 13 red tests in its .test.mjs) Reject @Marcelle-Labs and Vreko imports, workspace.vreko.json assumptions, copied schema, host/site code, sibling-path and workspace dependencies, unpinned standard deps, @workspacejson/cli losing private:true, and any workflow publishing a package this repository does not own. Parity receipts in migration/ - agents-audit: 29/29 runtime checks; packed file inventory identical to the published 0.4.4 tarball; 18/21 manifest keys byte-identical with runtime dependencies exactly equal. - DataHub shim: 35/35 checks, proven independently. Deferred by design: META-236 package identity, META-195 producer enrichment, META-235 dual emission, META-243 authority cutover.
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.
Extracts the CLI slice of the four-repository migration into
workspacejson/cli, with history preserved and parity proven separately for each of the two CLI packages.Linear: META-240 (child of META-237, gated on META-238). Ledger: Four-repository migration ledger.
Frozen source
Re-measured with
git rev-parse HEADagainst a clean clone. Not inherited from the earlier note — it happened to match.META-138 contamination gate re-run (not assumed from its
Donestate), across--all --full-history:.vreko-swarm,agents-workspace-cannon-repo,vreko-gtm-strategy.md,vreko-architecture.md,launch-posture.md,workspace.vreko.json, and-S'@marcelle-labs'all return nothing. Clean.Extraction method
git filter-repopath filter, then a reconstructed repository root. 124 commits → 51 commits; full old→new mapping committed atmigration/commit-map.txt(133 entries, 53 preserved / 79 dropped). Exact command inmigration/PROVENANCE.md.Fidelity verified before any reconstruction — extracted trees are byte-identical to the frozen source:
Excluded-path leak check: 0 commits for
packages/spec,packages/rules,docs/,assets/,.planning/,.agents/,pnpm-lock.yaml, rootREADME.md/CHANGELOG.md/AGENTS.md.This PR's base (
main) is the raw extraction; the diff is exactly the repository-root reconstruction.Current → target paths
packages/agents-audit/**packages/agents-audit/**packages/cli/**packages/cli/**scripts/verify-package-tarball.mjsscripts/verify-published.mjsscripts/verify-npm-publish-access.mjstypes/ambient.d.tstsconfig.base.jsonpnpm-workspace.yaml,.npmrc,.gitignore,.changeset/README.md,.github/ISSUE_TEMPLATE/**,.github/pull_request_template.md,CODE_OF_CONDUCT.mdpackage.json,README.md,CHANGELOG.md,AGENTS.md,CONTRIBUTING.md,SECURITY.md,.changeset/config.json,.github/workflows/*packages/spec/**,packages/rules/**docs/audits/**,.planning/**,assets/**,.agents/workspace.json,pnpm-lock.yamlThe two CLI packages remain distinct
This is the load-bearing constraint of META-240, and nothing here merges, renames, or republishes either package.
packages/agents-audit/agents-audit@0.4.4AGENTS.mdaudit and the real workspace.json generator (src/cli.ts,src/generate.ts). Binagents-audit.packages/cli/@workspacejson/cli@0.0.1private: true, registryE404fileIndexjoin. Bin declaredworkspacejson. Not the generator.Verified mechanically:
packages/clicontains nogenerateWorkspaceJsonreference and depends on neitheragents-auditnor@workspacejson/rules.Parity —
agents-auditPacked artifact
File inventory identical to both the old candidate and the published
agents-audit@0.4.4tarball (9 entries).Semantic manifest comparison against the published tarball — 18 of 21 keys byte-identical:
@workspacejson/specand@workspacejson/rulesresolve to"0.4.4"in the new packed manifest — exactly whatpnpm packalready wrote into the published tarball fromworkspace:*. The pin changes the committed source, not the packed bytes.Tarball hashes differ because manifests differ by the three intentional fields above; the file inventory is identical.
Registry integrity independently re-verified by download and re-hash — 3/3 match
dist.integrityforagents-audit,@workspacejson/spec,@workspacejson/rules@ 0.4.4.Runtime — 29/29, both sides installed from packed tarballs, identical fixtures
Receipt:
migration/parity-agents-audit-runtime.txt, harness:migration/parity-agents-audit-runtime.sh.Command surface — exit code and normalized output identical old vs new:
--help,--version,scan .,scan . --json,generate --dry-run,generate --check,generate,generate --force, unknown-flag rejection.Load-bearing behaviors were perturbed, not merely exercised:
--force--force--check--forceover invalid artifactworkspace.json.invalid.<ts>manual.fragileFiles+ regenerate--dry-run--checkGenerated artifacts byte-identical excluding volatile timestamps; producer stamp
{name: agents-audit, version: 0.4.4}on both. Public import surface identical (9 exports).Full suite: 63 tests, 11 files (source control: 62 — the +1 is the
package-metadatasuite going from 3 cases to 4, fully accounted for).Parity — private DataHub shim, proven separately
Receipt:
migration/parity-datahub-shim.txt, harness:migration/parity-datahub-shim.mjs. 35/35. A green producer result is not evidence about this package, so it shares nothing with the run above.Covers: package identity/privacy,
canonical/computeProjectPrefix/normalizeModelPath, multi-project dbt discovery (withnode_modulescorrectly ignored), manifest extraction, join againstgenerated.fileIndex, legacy top-levelfileIndexfallback, and the zero-join non-zero exit.Perturbed: dropping the project prefix collapses the same nested join from 2/2 to 0/2 — the exact silent failure this shim exists to surface; a partial
fileIndexyields 1/2 rather than all-or-nothing; a dbt project outside the git root exits 2.Package tests: 6/6 both sides.
Intentional differences
repository.url/bugs.url→workspacejson/cli. Required by the ledger's parity criteria.@types/nodeadded topackages/agents-auditdevDependencies. Not cosmetic — a genuine defect the split exposed. The monorepo resolved@workspacejson/rulesto source via thetsconfig.base.jsonpath alias, which transitively pulled@types/nodeinto the program and silently suppliednode:crypto,fs.realpathSync, andfs/promises.{rename,unlink}. Against the publishedrulesdeclarations that leak disappears and the DTS build fails. The type environment is now declared rather than inherited by accident.types/ambient.d.tsis unchanged from the frozen source (verified byte-identical) — I did not paper over it by editing the ambient stub.tsconfig.base.jsondrops the@workspacejson/rules → packages/rules/src/index.tsalias (that directory is standard-owned now).verify-package-tarball.mjsno longer packs../rules/../specoff disk; it resolves them as a consumer would, withWORKSPACEJSON_STANDARD_TARBALLSfor pre-publication candidates. Its fixed-group assertion became an exact-pin assertion, since this repo does not own that group.verify-published.mjsverifies onlyagents-audit.package-metadata.test.tsdropspackages/spec/packages/rulesassertions (they move under META-239) and gains assertions that the shim stays private and standard deps stay pinned..changeset/config.json— fixed group emptied,@workspacejson/cliignored.README/CHANGELOG/AGENTS/CONTRIBUTING/SECURITYrewritten as CLI-owned.Clean-room and boundary guards
scripts/check-architecture.mjs, run in CI, with 13 red tests inscripts/check-architecture.test.mjs. Every guard class was observed rejecting a deliberate violation, plus a baseline case asserting the unmodified repo passes:Ownership documented in
OWNERSHIP.md.One thing I did not silently accept
types/ambient.d.tscarries a hand-writtendeclare module '@workspacejson/spec'restating that package's TypeScript surface, and ambient declarations shadow the realnode_modulestypes. It is not a clean-room violation (not@marcelle-labs, not Vreko, not the normativeschema/v1.json), and migrating it unchanged is what parity requires — so it moved verbatim. But it is a duplicated view of a standard-owned contract living in this repo. Logged on META-236/META-165; the published tarballs do ship real declarations, so the follow-up is viable.Publishing remains disabled
.github/workflows/release.ymlhas no enabled trigger, requestscontents: readonly, holds no credential, and contains no publish step at all — not a conditional one.workspacejson/clihas no repository secrets (verified: empty secret and variable lists). It is mechanically incapable of publishing.workspace-json/agents-auditretainsNPM_TOKENand remains the sole publisher ofagents-audit.@workspacejson/cliremainsprivate: trueand absent from npm.Rollback
workspace-json/agents-audit@e47eb1b8556c4f361db9a78190a2f36b400756e8The source repository was not modified. No reverse-merge machinery exists.
Deferred — explicitly not done here
agents-auditis not converted to a bridge;@workspacejson/cliis not renamed, published, or broadened.fileIndex/frameworkManifestenrichment.version/specVersiondual emission.Verification run locally