Repository navigation
Publish the Actions SDK under the Railgrid npm scope - #1073
Conversation
|
@mjudeikis-bot review |
mjudeikis
left a comment
There was a problem hiding this comment.
Three findings, none Critical. The one that matters is ordering: the registry has no @railgrid/[email protected] today.
Not anchored
None.
Checked
Read beyond the diff
providers/app-studio/api/llm.goprojectSystemPromptForModearound the grant branch (initialBuild and existing-project paths) andprojectHasProviderActionGrant.llm_test.gopositive and negative prompt tests.providers/app-studio/skills/bundled_test.go(what the auth skill test asserts).providers/app-studio/api/assistant_mode_prompt.go:42(restart_runtime rule).providers/infrastructure/install/templates/application.yaml(theapicomponent'sreload.rulesforpackage.json).- The release workflow in full,
provider-sdk/actions-node/{package.json,install-test.mjs,README.md},.github/workflows/ci.yamljob. - A repo-wide grep for
crwilhitandactions-node. The only remainingcrwilhithit is an unrelated evidence string indocs/design/components/model-connections.md. No stale0.2.1pins remain. - Registry state via
npm view:@railgrid/actions-nodereturns E404,@crwilhit/railgrid-actions-nodeis at 0.2.1,@railgrid/auth-nodeis at 0.1.1.
Hunt categories
- Correctness: the pin is consistent across
package.json, docs, README, skill reference and prompt. The existing-project branch now covers the old alias. The negative test now keys on"@railgrid/actions-node":; the old needle never matched anything. Finding 1 is the exception. - Concurrency: n/a, no code paths with shared state changed.
- Tenancy and kcp: n/a, no client, lister, APIExport or claim changes.
- Provider contract: n/a, no verbs, manifest, chart or route changes. The prompt still routes through the project-scoped gateway.
- API, codegen, storage: n/a, no
apis/changes, so codegen is not affected. Existing apps keep resolving the old alias package, which is still published. - Security: the release workflow keeps OIDC trusted publishing and
--provenance, with no long-lived token. No credential or header handling changed. The SDK is still described as server-only. - Portal: n/a.
- Tests: the prompt tests cover the new pin and the alias-aware wording. The install smoke test covers the packed name. Nothing asserts the new auth-skill text (finding 3).
Commands run
cd providers/app-studio && go build ./...passed;go vet ./api/ ./skills/passed.go test -count=1 ./skills/passed.go test -count=1 -run TestProjectPrompt ./api/passed.cd provider-sdk/actions-node && npm testpassed (21/21);npm run test:installpassed;npm pack --dry-runshows@railgrid/[email protected].make verify-workflowsexited 0;make verify-boilerplatepassed;git diff --checkis clean.- Not run:
make lint(only strings and Markdown changed in Go, andgo vetpassed),make verify-provider-contractandmake verify-codegen(no manifest, chart, route orapis/change), and e2e (no server-path code changed; the e2e suites cannot exercise a package that is not yet on npm).
| } | ||
| if projectHasProviderActionGrant(p) { | ||
| b.WriteString("When an active integration action grant is listed above, server code may import the server-only SDK as `import { createActionsClient } from '@railgrid/actions-node';` using the exact dependency alias `\"@railgrid/actions-node\": \"npm:@crwilhit/railgrid-actions-node@0.2.1\"`. Never use a monorepo-relative path, provider-specific SDK, or browser import.\n") | ||
| b.WriteString("When an active integration action grant is listed above, server code may import the server-only SDK as `import { createActionsClient } from '@railgrid/actions-node';` using the exact dependency `\"@railgrid/actions-node\": \"0.2.2\"`. Never use a monorepo-relative path, provider-specific SDK, or browser import.\n") |
There was a problem hiding this comment.
Warning: Prompt pins a version that is not on npm yet
npm view @railgrid/actions-node returns E404 right now, and the @crwilhit/[email protected] package is the only published copy. The first publish is manual and the Rollout section says to publish before deploying, but nothing enforces that order. If this merges and App Studio is deployed first, every new project with an active action grant is told to write "@railgrid/actions-node": "0.2.2". The component's npm install reload then fails with ETARGET. The same prompt tells the model not to run npm itself and to stop on a failed dependency reload, so these projects are stuck.
Land the pin only after the first publish is confirmed. Either keep the old alias pin in this PR and flip it in a follow-up, or gate the merge on npm view @railgrid/[email protected] version succeeding. The same applies to docs/provider-actions.md, providers/app-studio/README.md and skills/railgrid/references/app-studio.md, which now document the new pin as current.
// follow-up PR, after `npm view @railgrid/[email protected] version` succeeds
using the exact dependency `\"@railgrid/actions-node\": \"0.2.2\"`| For the `application` template, edit `api/package.json` and let App Studio sync | ||
| the change. The API component's dependency reload runs the install when the | ||
| manifest changes, and the production build uses the same manifest. A separate | ||
| registry lookup or install command is unnecessary for the normal setup. |
There was a problem hiding this comment.
Note: Install guidance contradicts the general runtime prompt and refers to an undefined command
assistant_mode_prompt.go:42 tells the assistant to call restart_runtime after any dependency-manifest change because file sync does not reload process configuration. This text says to rely on the api component's reload rule alone. That rule exists in application.yaml (api.reload.rules for package.json), but only for the application template, and the two instructions will pull the model in different directions. "If a command shows Unverified with no output" does not say which command, so the model cannot act on it.
Name the tool (verify_development_runtime) and state whether restart_runtime is still required after the manifest sync.
| becomes `displayName`. Do not return or persist the assertion, use email as a | ||
| key, or create a second auth cookie inside the app. | ||
|
|
||
| Use `get_project_authentication` to confirm `enabled` for the project and |
There was a problem hiding this comment.
Note: New auth-skill guidance has no test that would fail without it
The PR lists "the bundled Auth skill test" as verification. skills/bundled_test.go:54 only asserts @railgrid/auth-node, X-Railgrid-App-Identity and RAILGRID_AUTH_AUDIENCE for express.md, and get_project_authentication etc. for SKILL.md. It passes identically with or without the /api/me 401, sign-in, 401 sequence added here, so the new guidance can be deleted or reworded without a failure.
"express.md": {"@railgrid/auth-node", "X-Railgrid-App-Identity", "RAILGRID_AUTH_AUDIENCE", "get_project_authentication", "/api/me"},
Summary
@railgrid/[email protected]. The package name and import path now match./api/methrough the preview before sign-in, after sign-in, and after logout.Verification
npm pack --dry-runmake verify-workflowsandgit diff --checkmake fix-lint,make lint, and targeted App Studio lintRollout
Publish
@railgrid/[email protected]fromprovider-sdk/actions-nodewith an npm account authorized for therailgridscope. Verify a clean install from the public npm registry before deploying the updated App Studio provider or distributing the updated skill torailgrid-dev. See the SDK release instructions. Existing apps can update their dependency and lockfile through their normal dependency update flow.