Skip to content

release: @workspacejson/cli 0.6.0 canonical standard authority - #25

Merged
qmarcelle merged 2 commits into
mainfrom
release/meta-cli-canonical-standard-authority
Aug 19, 2026
Merged

release: @workspacejson/cli 0.6.0 canonical standard authority#25
qmarcelle merged 2 commits into
mainfrom
release/meta-cli-canonical-standard-authority

Conversation

@qmarcelle

@qmarcelle qmarcelle commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What changed

Moves @workspacejson/cli from the old-org @workspacejson/spec / @workspacejson/rules 0.4.4 authority to the canonical workspacejson/standard 0.5.0 release and prepares @workspacejson/cli@0.6.0.

This is an authority-migration release, not a capability release. No mining, ranking, retrieval, provenance-contract, or command-surface changes are included. agents-audit deliberately remains frozen on 0.4.4.

Why 0.6.0

The CLI's emitted declarations expose Standard types. spec@0.5.0 introduces a source-level CoChangeEntry union break that propagates to CLI TypeScript consumers, so a minor release is more truthful than a patch.

Behavioral proof

The prior pinned CLI and this release candidate were compared over four fixtures: this repository, a minimal clean repository, an empty Git repository, and a single-file repository. Produced artifacts were byte-identical after normalizing the two wall-clock timestamps (generated.generatedAt and generated.hygiene.scannedAt). The frozen agents-audit parity harness remains at its ratified baseline: 25 passed, 4 expected differences, gate PASS.

computeHygieneScore is nullable in rules 0.5.0. If it returns null, the producer omits optional generated.hygiene rather than fabricating a score. The path is currently unreachable through the first-party producer; that separate Standard finding is being recorded on META-284.

META-244's compile-time type-visibility discriminator is also re-anchored to the 0.5.0-only validateStoredKey / StoredKeyResult surface because version is now widened to string.

Release discipline

  • release-candidate source SHA: eb7843b1f9e2dae91ba22f837431275ec2ccbaff
  • authority-migration commit: cb4b579cd3e0028a56bc9a25970c2955e0ae3073
  • follow-up CI fix: package-docs red test changed from hard-coded 0.6.0 to a guaranteed contradictory 9.9.9 so the guard remains non-vacuous after the real manifest became 0.6.0
  • manifest version: 0.6.0
  • canonical dependencies: @workspacejson/spec@0.5.0, @workspacejson/rules@0.5.0
  • no cli-v0.6.0 tag exists yet
  • no npm publish should occur until this PR is merged and the tag points at the resulting main commit
  • Linear issue attribution wiring is intentionally not included in this cut; the release record will be advanced explicitly after registry verification

Validation

Local release validation before PR:

  • build/typecheck/test gates green
  • package/tarball verification green
  • normalized artifact parity across four fixtures
  • agents-audit frozen-source parity unchanged

PR CI initially exposed one vacuous red test in check-package-docs.test.mjs: the test attempted to mutate the manifest to 0.6.0, which is now the real version, so it no longer created a contradiction. The follow-up commit fixes only that test fixture; CI must be green before merge.

Summary by Sourcery

Release @workspacejson/cli 0.6.0 against the canonical workspacejson/standard 0.5.0 authority without changing the CLI command or capability surface.

Bug Fixes:

  • Handle empty hygiene scans by omitting the optional hygiene declaration instead of reporting an unsupported clean score.

Enhancements:

  • Move the CLI's canonical specification and rules authority from the 0.4.4 packages to the 0.5.0 standard release.
  • Re-anchor published-spec type visibility checks to the 0.5.0 stored-key API.
  • Prepare @workspacejson/cli version 0.6.0 while keeping generated document profiles and the frozen agents-audit compatibility bridge unchanged.

Documentation:

  • Update package documentation and registry status to describe the prepared 0.6.0 CLI release and its 0.5.0 standard dependencies.

Tests:

  • Update package documentation guard coverage and contract visibility tests for the 0.5.0 published APIs.

…ETA-354)

Repoint the producer's standard dependencies from the old-org publication
lineage to the canonical one: @workspacejson/spec and @workspacejson/rules
0.4.4 -> 0.5.0. 0.4.4 was published from workspace-json/agents-audit; 0.5.0 is
published from workspacejson/standard. The dependency edge, not just the
version range, now points at the canonical publisher.

This is an authority-migration release. No mining, ranking, provenance,
retrieval or command-surface changes ride along.

Minor rather than patch because dist/index.d.ts carries WorkspaceJsonV4 in an
exported signature, so spec 0.5.0's CoChangeEntry union propagates to consumers
of this package's types: reading `.rate` without narrowing stops compiling. The
standard classified that same propagation as a minor; this package inherits it
instead of hiding it behind a patch.

agents-audit deliberately stays on 0.4.4. It is frozen, locked for judging, not
published from this repository, and its published artifact declares no
dependency on this package. The two packages now resolve different versions of
the standard on purpose.

Behavior:

* Artifacts are byte-identical to the previously pinned build across every
  fixture tried — this repository, a minimal clean repo, an empty repo — modulo
  the generatedAt and hygiene.scannedAt timestamps.
* The agents-audit frozen-source parity harness still reports exactly its
  ratified baseline of four expected differences.
* computeHygieneScore is HygieneScore | null as of rules 0.5.0. Where it
  returns null the producer now omits generated.hygiene rather than
  substituting a value; the field is not in the schema's generated.required
  set, and every placeholder would be a measurement claim that was not made.
  This path is currently unreachable: the producer's rule set emits at least
  one finding for every input tried, including an empty repository, so
  computeHygieneScore never receives the empty array that yields null.

The META-244 type-visibility guard is re-anchored. It worked by importing
symbols present only in the real published package, with `version`'s literal
type as the discriminator against a handwritten ambient stub. spec 0.5.0 widens
`version` to `string` — exactly what the stub declared — so that half no longer
discriminates. The guard now also imports validateStoredKey and StoredKeyResult,
which are new in 0.5.0 and were never in the stub, restoring the compile-time
property.
Copilot AI lite review requested due to automatic review settings August 19, 2026 02:49

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

qmarcelle has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sourcery-ai

sourcery-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Reviewer's Guide

Authority-migration release for @workspacejson/cli to consume @workspacejson/spec and @workspacejson/rules 0.5.0, with guarded hygiene-block omission logic and updated type visibility tests, while keeping emitted artifacts effectively unchanged for normal inputs and aligning docs/metadata with the 0.6.0 manifest.

Sequence diagram for hygiene block handling in generateWorkspaceJson

sequenceDiagram
  actor Repo
  participant cli_producer as generateWorkspaceJson
  participant rules as computeHygieneScore
  participant Artifact as workspace_json

  Repo->>cli_producer: generateWorkspaceJson(options)
  cli_producer->>rules: computeHygieneScore(findings)
  rules-->>cli_producer: HygieneScore_or_null

  alt score_is_null
    cli_producer->>Artifact: emit generated without hygiene
  else score_not_null
    cli_producer->>Artifact: emit generated.hygiene with score grade counts scannedAt
  end

  cli_producer->>Artifact: isMateriallyCurrent(existing workspace)

  alt unchanged_and_hygiene_defined
    cli_producer->>Artifact: preserve generated.generatedAt
    cli_producer->>Artifact: update hygiene.scannedAt
  else unchanged_and_hygiene_undefined
    cli_producer->>cli_producer: [do not create hygiene block]
  end
Loading

File-Level Changes

Change Details Files
Guard hygiene-block emission so generated.hygiene is omitted when no findings are observed, and ensure scannedAt is only updated when the hygiene block exists.
  • Wrap hygiene block construction in a conditional spread that emits hygiene only when computeHygieneScore returns a non-null score.
  • Add commentary explaining the semantics change from 0.4.4 to 0.5.0 for hygiene scoring and why omission is the truthful behavior.
  • Change the generatedAt/scannedAt carry-forward logic to only update scannedAt when workspace.generated.hygiene is defined, avoiding resurrection of an empty hygiene block.
packages/cli/src/producer/generate.ts
Update META-244 spec-contract visibility guard to anchor on the 0.5.0 stored-key surface instead of the version literal type, and adjust expectations to the new spec release.
  • Change imports from @workspacejson/spec to include validateStoredKey and StoredKeyResult alongside existing symbols.
  • Update the version assertion to expect the runtime value '0.5.0' and revise comments to explain the loss of literal-type discrimination.
  • Add a new test that calls validateStoredKey and asserts on StoredKeyResult.valid to enforce compile-time visibility of the stored-key surface.
  • Retain and recontextualize the validateV4 visibility test against the new contract.
packages/cli/src/spec-contract-visibility.test.ts
Release metadata and documentation updates for @workspacejson/cli 0.6.0 and the authority migration to @workspacejson/spec/@workspacejson/rules 0.5.0.
  • Add a 0.6.0 section to the CLI changelog detailing the authority migration, its semver classification, artifact parity, hygiene behavior, and agents-audit pinning rationale.
  • Update README registry snapshot text, package table version, and explanation of spec/profile vs CLI semver to match the 0.6.0 release and 0.5.0 spec/rules dependencies.
  • Bump the CLI package.json version from 0.5.2 to 0.6.0 and update the description’s dash character to a standard ASCII em dash.
  • Change @workspacejson/spec and @workspacejson/rules dependency versions in package.json from 0.4.4 to 0.5.0 and refresh pnpm-lock.yaml to match the new authority versions.
packages/cli/CHANGELOG.md
README.md
packages/cli/package.json
pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@socket-security

socket-security Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​workspacejson/​rules@​0.5.0761009393100
Added@​workspacejson/​spec@​0.5.07710010093100

View full report

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The conditional spread around hygiene in generateWorkspaceJson is doing a lot of work; consider extracting the hygiene omission/creation logic into a small helper to keep the main generator flow easier to follow and reduce the risk of reintroducing the “bare timestamp” state.
  • The spec-contract-visibility test now hardcodes both the exact spec version string 0.5.0 and a concrete stored key ('src/a.ts'); consider loosening these assumptions (e.g., using a clearly synthetic valid key or a more generic version check) so future spec bumps or layout changes don’t require touching this guard test.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The conditional spread around `hygiene` in `generateWorkspaceJson` is doing a lot of work; consider extracting the hygiene omission/creation logic into a small helper to keep the main generator flow easier to follow and reduce the risk of reintroducing the “bare timestamp” state.
- The `spec-contract-visibility` test now hardcodes both the exact spec version string `0.5.0` and a concrete stored key (`'src/a.ts'`); consider loosening these assumptions (e.g., using a clearly synthetic valid key or a more generic version check) so future spec bumps or layout changes don’t require touching this guard test.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

qmarcelle has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@sonarqubecloud

Copy link
Copy Markdown

@qmarcelle
qmarcelle merged commit 9734574 into main Aug 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants