Skip to content

release: 0.8.27 — central manifest workflow, access policies, hotfixes - #580

Merged
neuromechanist merged 33 commits into
mainfrom
dev
May 22, 2026
Merged

neuromechanist merged 33 commits into
mainfrom
dev

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Release rolling 29 commits from dev (badd48c..72f4cf8) into main. Per project release flow (auto-tag.yml strips -dev* suffix on merge, creates tag v0.8.27, triggers npm-publish.yml).

Headline changes

Epic #559 — Centralize manifest generation (PR-1)

Access policies + IAM (#571 + #574)

  • New canonical doc docs/operations/access-policies.md (six operational principles + 5 IAM user catalog).
  • 5 dedicated IAM users live in AWS (nemar-runtime group): nemar-worker-prod, nemar-worker-dev, nemar-actions-datasets, nemar-actions-cli, nemar-hallu-readonly. Permissions boundary attached to all.
  • Worker secrets rotated; GitHub org/repo secrets rotated.
  • scripts/lib/aws-creds-guard.sh rejects long-lived AKIA* env vars on admin scripts.

Hotfix #570 (already on prod since 2026-05-22)

  • getManifest() and loadSummary() use unsigned-first / signed-fallback to survive Worker credential outages on the public read path.

Other

  • #566 retire backend/wrangler.toml (personal Cloudflare account configuration removed).
  • #553 auto-generate participants.tsv when missing at BIDS root.
  • #579 --missing-metadata 24h recency guard.

Auto-tag flow

On merge: .github/workflows/auto-tag.yml strips 0.8.27-dev4 → 0.8.27, commits, tags v0.8.27, npm-publish.yml fires and publishes to npm with latest tag. sync-dev.yml then merges main back to dev and bumps to 0.8.28-dev0.

Pre-merge ops state (no action required)

  • IAM users live in AWS account 191754232783, all in nemar-runtime group
  • SCCN prod Worker carries the new nemar-worker-prod credentials
  • SCCN dev Worker carries the new nemar-worker-dev credentials
  • MANIFEST_CALLBACK_SECRET set on nemarDatasets org-level + both SCCN Workers
  • D1 migration 0025 already applied on both prod and dev
  • Hallu credentials at /home/yahya/.aws/credentials (nemar-hallu-readonly)

Post-merge follow-ups (separate PRs)

neuromechanist and others added 29 commits May 18, 2026 20:18
…+ part of #558)

PR-1 Stream A of epic #559. Adds scripts/emit_manifest.py (git-tree walk, no GitHub API), .github/workflows/generate-manifest.yml (repository_dispatch + workflow_dispatch), and helper scripts. Replaces in-worker manifest generation. Emits both manifest.json (existing shape) and summary.json (new compact artifact per #558). 25 real-git tests pass. Closes part of #556 + #558.
PR-1 Stream C of epic #559. Adds loadSummary helper, GET /:datasetId/:version/summary.json route (static passthrough, s-maxage=86400), and scripts/backfill-summaries.sh for the 5 recovered datasets. Includes 403-throws fix (silent-credentials-drift) and 500-on-S3-error fix from review round. 3 unit tests + real-S3 conditional test pass. Companion: nemarOrg/website#29. Closes part of #558.
PR-1 Stream B of epic #559. Adds triggerManifestGeneration dispatch (targeting nemarOrg/nemar-cli central repo), POST /webhooks/manifest-ready callback (HMAC-validated, S3 HEAD-checked, dataset_versions insert + nemar-sync deferred until callback), POST /webhooks/manifest-failed callback, migration 0025 (manifest_jobs), and feature flag MANIFEST_VIA_CENTRAL_WORKFLOW (default false). Includes review-round fixes: 403→throw, crypto-error→500, nemar-sync moved to manifest-ready, 500-on-insert-fail, skipCanary wired, validateManifestCallbackBody + isCentralManifestWorkflowEnabled unit tests, supersession warn, dead fallback removed. canary_skipped field handoff from Stream A accepted. 108 manifest+sync tests pass. Closes part of #557.
#563)

Epic of #556 + #557 (PR-1) + #558. Three streams (Generator/Worker/Serving) merged into the epic branch via squash; final integration via regular merge to preserve sub-stream commit history. Behind feature flag MANIFEST_VIA_CENTRAL_WORKFLOW (default false); old generateManifest() path stays active as fallback. 33 Python tests + 86 backend tests pass. Cross-phase review found 9 findings, all addressed on the epic branch. Follow-up issues (deferred): PR-2/PR-3/PR-4 of #557, E2E flag=true coverage, manual workflow_dispatch recovery command. Admin-bypass merge: GitHub Actions paths-filter blocked by billing/spending-limit issue, not test failure. Closes #559.
)

Follow-up to epic #559. Repoints CENTRAL_WORKFLOW_REPO from nemarOrg/nemar-cli (billing-constrained Free) to nemarDatasets/.github (GitHub Team). Companion to nemarDatasets/.github#1 (merged 318578a). Worker-side: getDatasetsToken replaces getNemarOrgToken; getNemarOrgAuth/getNemarOrgToken removed as dead code; 5 relocated files deleted; CI python-unit-test job moved to nemarDatasets/.github; state doc + backfill script + runbook updated to new repo. 69 manifest tests + typecheck clean. Admin-bypass: GHA billing block on changes job, not test failure. Closes #564.
Establishes the architectural contract for AWS IAM/S3 access across NEMAR. 6 operational principles + 5 IAM users live in AWS with bucket-scoped policies + permissions boundary. Validated end-to-end on SCCN dev (10-step e2e pass).
Implements principles 5 + 6 from access-policies.md at the script layer. Shared bash library scripts/lib/aws-creds-guard.sh rejects long-lived AKIA* in env, warns on ASIA*, requires ~/.aws/credentials or aws sso login. Skipped in --dry-run paths.
Removes backend/wrangler.toml + all in-repo references to the retired personal Cloudflare account. Backend npm scripts now explicitly pass -c wrangler-sccn.toml. SCCN-only deploy path going forward. Admin-merge: only the publish workflow (npm 409 race) fails; required checks all pass.
Flips the central-manifest-workflow flag from false→true under [env.dev.vars] only. Prod stays off. Full e2e on SCCN dev (10 steps, 21s) validated. Worker already deployed to SCCN dev; this commit makes the source of truth match the live state. Companion to #571 (access policies).
…#579)

Adds a recency guard to the reindex --missing-metadata filter so datasets whose upstream genuinely lacks required columns (e.g. nm000133 has no participants.tsv → subject_count stays NULL) don't get reindexed every hour with no progress. Default 24h; force-retry via --all. Replaces auto-closed #552. Companion to #553.
When a dataset's BIDS root doesn't include participants.tsv, derive a minimal one from the sub-XXX/ directory listing and commit it via the GH App. Closes the lifecycle gap that #579 mitigated with a recency guard: now the data actually appears instead of staying NULL forever. Pure module + 3 real-integration tests, no mocks. Case-sensitive on purpose (BIDS spec mandates lowercase); see code comment in participants-tsv.ts.
Cross-phase review on dev→main #580 found Commander's '30' default always overrode the server-side ?? 1 default for --missing-metadata, hiding the 24h recency guard from #579. Fix moves default into the action handler per filter. Admin-merge: publish workflow fails with the npm 409 race that #581 (just merged) fixes for next time.
@neuromechanist
neuromechanist merged commit 17dbd61 into main May 22, 2026
21 checks passed

This branch was previously deployed

2 inactive deployments
development — 71daa524 Deployed May 22, 2026 by neuromechanist via deploy-dev #358
npm — 71daa524 Deployed May 22, 2026 by neuromechanist via publish #1078
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