Skip to content

Compute review fixes: contracts, reporting, CLI, docs (B) - #2069

Merged
neuromechanist merged 15 commits into
feature/issue-2005-epic-compute-corefrom
fix/compute-review-contracts-docs
Nov 7, 2026
Merged

neuromechanist merged 15 commits into
feature/issue-2005-epic-compute-corefrom
fix/compute-review-contracts-docs

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Review fixes for PR #2063 (epic #2005), implementer B: contracts, reporting, CLI, docs and CI hygiene. Targets the epic branch, not dev. Money loops and the compute services are implementer A's separate PR.

Items

  • R3-I1: the ACCESS quarterly report counts slurm_job_id IS NOT NULL and remote_submitted_at in the quarter (UTC), what the reporter sends; comment and help fixed. Both reviewer scenarios tested.
  • R3-I2: ADR 0118 decision 13 and the implementation notes now say the dataset gate runs on the pipeline path only and is a requirement on the Epic D3 submit route. Hand-off posted on Phase D3: User job submission and nemar compute submit #2024.
  • R3-I3: ComputeRecordResponseSchema declares provenance_status, manifest_status, retention_until, launcher_files (open, optional); record prints missing and unreadable apart from a present empty value. A provenance that reads but is not an object is now unreadable, not ok.
  • R3-M2: account report rows carry settled and open_hold_milli; totals and by-pool carry unsettled and open_hold_milli; table and CSV print them.
  • R3-M3 and R2-M1: status adds prerequisites (callback secret, API base address, pipelines account, policy, people and pipelines pool grants) as booleans, reconciliation.paused, and attention (a record of counts built from a one-line-per-count table). printStatus and STATUS_HELP updated, including the ACCESS resource-name line.
  • R3-M3 docs: README section 8 has an ordered first-launch checklist.
  • R3-M4: one-secret-three-tokens documented in bindings.ts, compute-tokens.ts, .rules/revocation.md and ADR 0118 (A5 item 5), with the safe rotation.
  • R3-M5: COMPUTE_PIPELINE_REFUSAL_STATUS is derived from the ledger's table plus the pipeline-only words and typed against the union; the route's sentences are checked against PipelineRefusal at compile time and there is no 422 fallback; run_failed added (500). COMPUTE_PIPELINE_STAMP_STATES is now the registry's own list.
  • R3-M6 (reporting side): flags-from-columns is one typed map and helper (compute-job-flags.ts); the cast is gone. The jobView side is for A (see below).
  • R3-M7: shared/contract/compute-responses.ts holds open schemas for cancel, links and the observer answer; real route output is parsed in tests. sacctRows and settlementFailed are now sacct_rows and settlement_failed on the wire (the observer reads only the status code, checked in nemar-process observe.py; nothing else consumes them). The rename is done in the route, not the service.
  • R3-M9: ADR 0118 A5 item 11 has the maintenance table. LAUNCHER_CALLBACK_RE left unchanged: the launcher uses API_BASE_URL without a prefix, and the miss is in the safe direction; documented and pinned by a test.
  • R2-M4: the active holds list reads one extra row and says truncated; route, contract and CLI.
  • R2-M8: the workflow checks out exec.json.tmpl, sets NEMAR_PROCESS_DIR and NEMAR_REQUIRE_PROCESS_QUEUES=1; the queue drift test fails instead of skipping when required. The flaky seam is declared in compute-jobs.test.ts. compute-sweep.test.ts is left as a simulated interleaving, now labeled: forcing a real two-run order is not deterministic.
  • R3 stale docs: group help text, api/compute.ts header, ACCESS_REPORTS_HELP, ADR decisions 8 and 10, the ADR index (A6, A7, Launch specification: shell-inert wire encoding (contract follow-up A1c) #2043, 2026-11-06 and the owner decisions), implementation notes, heldSql, and the Epic D mail-link hand-off (README and a comment on website#495).
  • R3 cast in compute-pipeline.ts: A owns that file; routed in the report.

Tests and mutation checks

Targeted only; the full suite was not run.

Each behavior change has a test through the real route or the real CLI, and a mutation run (the mutation was confirmed applied by diff before the run, then reverted):

Item Mutation Result
I1 remote_submitted_at/slurm_job_id term back to submitted_at compute-reporting-routes 2 fail
I3 CLI prints none for missing; Worker never says unreadable admin-compute-jobs-cli 1 fail each
M2 openHold = 0; unsettled never counted compute-reporting-routes 2 fail each
M6 flag column map mismatch -> flag_overrun compute-reporting-routes 1 fail
M3 paused always false; callback secret read from API base; pool grant ignores the holder; attention counts sent compute-status-route 3, 1, 1, 1 fail
M5 add a word to PipelineRefusal; drop run_failed's status; set it to 422 tsc fails (2 errors); tsc fails; contract unit test 1 fail
M7 route reverts sacctRows; reverts settlementFailed; drops total; renames the cancel outcome compute-observer 7 fail; 1 fail; compute-person-responses 1 fail each
M4 LIMIT without +1; truncated always false compute-reporting-routes 1 fail; admin-compute-jobs-cli 1 fail
M8 no template in the checkout with NEMAR_REQUIRE_PROCESS_QUEUES=1 the queue test fails (2 fail); with the real template from nemar-process it passes

Counts on the final head: backend compute-reporting-routes 23, compute-status-route 23, compute-pipeline-routes 36, compute-observer 51, compute-person-responses 3, maintenance 42, compute-queues 7, compute-e2e 3, compute-route-inventory 5, compute-jobs-admin-routes 7; root admin-compute-jobs-cli 30, admin-compute-status-cli 11, admin-compute-cli 27, admin-compute-pipeline-cli 33, compute-admin-contract.unit 37, compute-responses-contract.unit 6, compute-contract.unit 454, contract-schemas 63, adr-index.unit 10. All pass. bun run lint and bun run typecheck are clean on the head (commits used HUSKY=0); actionlint reports the same 3 findings with and without this change.

Notes

  • Not verified: the claim that a rotated callback secret ends a running job with result_upload_failed rests on the code path and the review, not on a run.
  • The gated documentation is reachable with nemar admin docs (checked with the systems inventory), but the pages that exist say nothing about compute.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2069

Version: 0.10.28-PR2069.1944f2d
Commit: 1944f2d


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit fcaa76a into feature/issue-2005-epic-compute-core Nov 7, 2026
31 checks passed
@neuromechanist
neuromechanist deleted the fix/compute-review-contracts-docs branch November 7, 2026 04:15

This branch was previously deployed

1 inactive deployment
npm — 1944f2d7 Deployed Nov 7, 2026 by neuromechanist via publish #4296
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