Skip to content

S3c: fail closed on a Tapis run while Tapis is unconfigured - #2168

Merged
neuromechanist merged 5 commits into
feature/portable-compute-epicfrom
feature/pc-s3c-tapis-unconfigured-fail-closed
Nov 14, 2026
Merged

neuromechanist merged 5 commits into
feature/portable-compute-epicfrom
feature/pc-s3c-tapis-unconfigured-fail-closed

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Card S3c of the portable compute plan: with COMPUTE_ENABLED on and no usable Tapis configuration, a pipeline run whose executor is tapis is now refused with tapis_unconfigured (503) before any stamp, hold, ledger entry, job row, record or audit row is written.

The defect (S3a inventory, G1, G2 and G4): with the pipelines pool funded and no Tapis credential, a run claimed a stamp, took a hold and made a job that no submit could send, because the submitter answers unconfigured before it looks at how long the job has waited. Only an administrator's cancel released the hold.

What changed: tapisSubmitConfigured(env) in backend/src/services/compute-lifecycle.ts (the one definition of "Tapis is usable", tapisAccess(env, TICK_READ) !== null, no request); the word tapis_unconfigured declared once (contract status 503, PipelineRefusal, the route's sentence, STOPS_A_RUN, ENDS_THE_RUN); a check in dispatchPipelineJob right after the runner-switch check (every caller: the route, dispatchEligible, the daily dispatcher) and a check in the route right after compute_disabled (a clean answer before the stamp sync and the audit row); a Tapis dry run's config gains tapis_configured, and the CLI's needs line says Tapis configured or Tapis NOT CONFIGURED.

Unchanged by construction: with Tapis configured every answer is as before, except the one tapis_configured key of a Tapis dry run (the schema is open, so an older CLI ignores it). A runner run never calls the predicate and its dry run has no new key. No switch is added or touched, backend/wrangler-sccn.toml is not edited, createJob, the ledger, the submit and cancel paths, the tick and the runner queue are untouched.

P1 of S3a before the fix, over the real admin router with the pool funded and Tapis unset: 201, submit: "unconfigured", one ledger row, one job, one stamp, one audit row and two records written. After the fix: 503 tapis_unconfigured with the declared sentence, and the snapshot (ledger, jobs and stamps row counts, compute.pipeline.run audit rows, every pool's totals, the records bucket listing, requests the Tapis stand-in saw) is equal.

Gates run at the head, all passing: bun run typecheck; bun run lint; bun test backend/test/compute-pipeline-tapis-unconfigured.test.ts backend/test/compute-pipeline-routes.test.ts backend/test/compute-pipeline.test.ts backend/test/compute-pipeline-dispatch.test.ts backend/test/compute-pipeline-caps.test.ts backend/test/compute-runner-jobs.test.ts backend/test/compute-tenant-ceiling.test.ts backend/test/compute-source-scan.test.ts test/compute-admin-contract.unit.test.ts test/admin-compute-pipeline-cli.test.ts (395 pass, 0 fail); bun test backend/test/compute-switches-flag.test.ts backend/test/compute-route-inventory.test.ts (64 pass, 0 fail); the leak check of cards/README.md over every added line (prints nothing).

Mutations, each reverted with git status --porcelain clean afterwards: the service check deleted fails (c) both cases and (d) both cases; the route check deleted fails (a) (the audit row appears) and (b) (200, not 503); the predicate returning true fails (a) to (d); tapis_unconfigured removed from STOPS_A_RUN fails the two-dataset case of (c). Also: the dry run's key dropped fails (e) and the Tapis dry run key list in compute-runner-jobs.test.ts; the CLI needs line's Tapis part dropped fails its CLI case; tapis_unconfigured out of ENDS_THE_RUN fails the pinned membership test; the Tapis check applied to a runner run too fails the new runner case.

Two edits beyond the card's literal list, both pinned lists that must gain the new key: the Tapis dry run's exact config key list in backend/test/compute-runner-jobs.test.ts gains tapis_configured, and test/admin-compute-pipeline-cli.test.ts gains two cases (the live refusal and the needs line) and one assertion that a runner dry run says nothing of Tapis.

Not run: the full bun test (about 80 minutes); would check it at the epic gate (card S2). Card Q0b and S6 touch some of the same files; the second to merge takes the base in and reruns its gates.

Card: S3c.

@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2168

Version: 0.10.34-PR2168.680e922
Commit: 680e922


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit d6638b9 into feature/portable-compute-epic Nov 14, 2026
1 check passed
@neuromechanist
neuromechanist deleted the feature/pc-s3c-tapis-unconfigured-fail-closed branch November 14, 2026 17:45

This branch was previously deployed

1 inactive deployment
npm — 680e922b Deployed Nov 14, 2026 by neuromechanist via publish #4462
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.

1 participant