fix(test): resolve NetScript packages from the workspace, not JSR at the unpublished release version - #1167
Merged
Merged
Conversation
Checkpoint of the Fable sub-agent's work before handing the slice to a mobile-steerable session. Not verified against the five proof steps yet.
2 tasks
7 tasks
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.
Summary
Two tests resolved NetScript packages from the live JSR registry at the workspace's own declared
version (
jsr:@netscript/...@${NETSCRIPT_RELEASE_VERSION}). On a release branch that version is byconstruction unpublished, so
check-testcould never be green andmain's ruleset refused therelease merge — the last blocker on stable 0.0.4. Both tests now resolve
@netscript/*from therepository workspace (
deno --config <repo>/deno.json), which is what they can honestly provepre-publish; registry-artifact resolution is owned by the post-publish production smoke.
Closes #1165
Why workspace resolution (and not version-pinning or a skip)
branch. Ecosystem research (Deno
@std, Fresh, oak, Hono; changesets, release-please,semantic-release, Lerna/Nx) shows the dominant mature pattern is exactly this split: source /
workspace resolution before publish, exact-published-version smoke after publish.
surface against new generated glue), and re-blocks the release branch whenever a release
intentionally changes that surface.
release-PR stage — the false-green class this release has already been burned by.
e2e-cli-prod.ymlinstallsjsr:@netscript/cli@<published version>and runs the fullscaffold.runtimesuite with--source jsrafter every publish (verified in the workflow), which exercises published sagasruntime resolution and plugin installs against the real registry artifacts.
Changes
packages/cli/src/public/features/generate/plugins/installed-runtime-registry-integration_test.ts— the saga-runtime test imports the same public
/runtimeexport subpath consumers use, butresolves it via the repository workspace config instead of
jsr:@netscript/plugin-sagas@<release version>. Renamed from "published dependency ..." to"packaged runtime export ..." so the name states what it proves.
plugins/ai/tests/adapter/no-samples-install_test.ts— the generated workspace type-check runsdeno check --config <repo>/deno.json, resolving@netscript/aifrom workspace source insteadof the consumer scaffold's unpublished-on-release-branch JSR pins. The
--no-samplesshapeassertions are unchanged.
Proof under release conditions (all five steps observed, not asserted)
Reproduced with the worktree bumped to unpublished
0.0.4exactly the wayrelease:cutdoes(
version:bump 0.0.4+gen:publish-assets+gen:assets-barrel):(
jsr:@netscript/plugin-sagas@0.0.4unresolvable); ai test failed withCould not find version of '@netscript/ai' that matches specified version constraint '0.0.4'.9 passed | 0 failed; ai test1 passed | 0 failed.9 passed | 0 failedand1 passed | 0 failed.startSagaRunnerexport inplugins/sagas/src/runtime/mod.ts→ saga test FAILED;temporarily renaming the
createMcpTransportPoolexport inpackages/ai/mcp.ts→ ai testFAILED. (A first demo attempt broke
createToolRegistry, which the--no-samplesglue doesnot import and correctly did not fail — the demo was repeated against a symbol the glue actually
uses.) Both breakage edits reverted.
Audit of the other
NETSCRIPT_RELEASE_VERSIONtest filesAll seven remaining files were run empirically at the unpublished
0.0.4:workspace-mutator_test.ts,registry-deno-json_test.ts,version-drift_test.ts,deno-agent-docs-generator_test.ts,init-agent_test.ts,ai-plugin-command_test.ts,dispatch-plugin-verb_test.ts— 45 passed, 0 failed. They build specifier strings or stubfetches and never resolve the live registry at the declared version; no latent trap found.
Validation
deno fmt --check/deno lint/deno check --unstable-kvon both changed files — clean.deno task testat 0.0.3 —2623 passed (567 steps) | 0 failed | 16 ignored (2m57s).🤖 Generated with Claude Code
https://claude.ai/code/session_01TH3jmm3ca7XVjTscYEyDoC