Repository navigation
Release v0.8.0: SCCN Cloudflare migration (Phases 1-10) - #355
Merged
Merged
Conversation
* Add SCCN wrangler config and update docs site_url - Add backend/wrangler-sccn.toml for SCCN Cloudflare account with new D1, Vectorize, and Workers AI bindings - Update mkdocs.yml site_url to docs.nemar.org - SCCN D1 prod: 009b1a44-a385-4ecf-812d-ec8341587cb5 - SCCN D1 dev: 017d8f4e-a591-4a3d-944b-01b5ffe5101d * Fix dev API URL in SCCN wrangler config * Address PR review: fix stale TODOs, secrets list, API URL * Polish comments per review: clarify cfman, ENCRYPTION_KEY, header
- Add migration 0019: description column on users table - Update wrangler-sccn.toml to use cfman as primary tool - Update CLAUDE.md with cfman accounts and SCCN infrastructure - cfman accounts: neuromechanist (personal), sccn (SCCN)
Brings to dev from main: - Maintenance mode middleware (#342) - MAINTENANCE_MODE=read-only flip (prod only; dev [env.dev.vars] stays off) - Upload resume fix (#335) - S3 initremote fix on resume (#337) - PR-merge workflow, HED detection, bulk CI deploy (#338) - npm publish fixes (Node 20, npm@11, OIDC) - GitHub Release auto-tag
Sync main to dev: maintenance mode + hotfixes
* Make sender/reply-to env-configurable for SCCN * Address PR review: test, validation, docs * Fix stale test: update nm999999 past MAX_NUMBER cap * Fix stale CLI test: update nm999999 past MAX_NUMBER cap
* Phase 8: bind api.nemar.org custom domain on SCCN worker Adds Workers Custom Domain route for api.nemar.org and updates API_BASE_URL var to match. Cloudflare auto-manages the proxy DNS record and TLS cert; no separate DNS step needed. Tested: - curl https://api.nemar.org/health -> 200 (worker version 0.1.0) - curl https://api.nemar.org/datasets -> 200, response identical to https://nemar-api.sccn-org.workers.dev/datasets - workers.dev URL still answers (kept as buffer) Refs #329 * Phase 8 review fixes: drop stale pre-cutover comments - wrangler-sccn.toml header no longer warns against production use; this is now the canonical SCCN config. - CLAUDE.md SCCN API URL line points to api.nemar.org with the workers.dev URL noted as fallback. Refs #329
* chore: bump version to 0.8.0-dev * Phase 9: flip CLI default API URL to api.nemar.org Source changes: - src/lib/api.ts, src/lib/config.ts, src/commands/auth.ts: DEFAULT_API_URL is now https://api.nemar.org. IS_DEV_BUILD detection (workers.dev substring) is unchanged and still flips for CI-injected dev builds. - src/lib/config.ts: new migrateApiUrl() runs on module load and silently rewrites stored apiUrl entries that match the legacy default. Custom URLs (workers.dev, self-hosted) are untouched. The legacy redirect on the personal Cloudflare worker keeps stale configs working through Phase 11. Test: - test/config-migrate-api-url.test.ts: real integration test against a temp config dir, covers legacy rewrite, idempotent rewrite of already-new URL, and pass-through of dev/custom URLs. - test/setup.ts default updated to api.nemar.org. CI: - .github/workflows/npm-publish.yml: dev-branch sed pattern updated to source from api.nemar.org and target nemar-api-dev.sccn-org.workers.dev (SCCN dev worker, not the personal one). Without this dev npm publishes would silently keep pointing at api.nemar.org. Docs: - scripts/generate-docs.ts: API reference base URL updated. Refs #330 * Phase 9 review fixes - Export DEFAULT_API_URL from src/lib/config and use it in auth.ts (was: duplicate hardcoded literal). Eliminates drift risk on the next URL change. Build dedupes the literal too. - Add idempotency note on migrateApiUrl() per reviewer ask. - Test: cover account with no apiUrl field (legacy-flat migration result) to guard the optional-chaining guard. Refs #330
* fix: backend reports actual version on /health and / - Stop hardcoding 0.1.0 in backend/src/index.ts; import version from backend/package.json. Single source of truth. - Bump backend/package.json from 0.1.0 to 0.8.0-dev so it tracks the CLI version (CLI and backend ship together). - bump-version.sh now keeps backend/package.json in sync, so future bumps update both files atomically. - Refresh the index.ts header doc comment: production route is api.nemar.org (SCCN), dev is nemar-api-dev.sccn-org, and the personal api.osc.earth/nemar URL is the read-only buffer. * fix: bump-version restore_versions handles backend pkg too Reviewer note: the three failure paths restored only root package.json, leaving backend/package.json modified if a bump aborted mid-way. Factor a restore_versions() helper that touches both files so the working tree is never half-rolled-back. * refactor: backend reads root package.json as version source Backend was importing ../package.json (backend/package.json), with the bump script syncing the two manifests. That left two write paths to keep aligned. Wire the runtime to import the repo-root package.json directly (../../package.json from backend/src/index.ts), making the CLI manifest the single source of truth. backend/package.json stays (it is private/never published, but wrangler and bun tooling expect it). bump-version.sh keeps it in lockstep and now also asserts backend.version == root.version post-bump, so any drift introduced by a hand-edit fails the bump loudly. Wrangler dry-run + tsc clean with the new import path.
api.nemar.org is canonical post Phase 8; the personal api.osc.earth worker is the read-only buffer scheduled for sunset in Phase 11. Reorder the entries so the doc reflects current reality.
* Phase 10: flip CI/CD to SCCN account (#331) - catalog-sync.yml: prod/dev URLs to api.nemar.org and SCCN dev worker - test.yml: TEST_API_URL to SCCN dev (5 jobs) - deploy-backend.yml: pass -c wrangler-sccn.toml so D1 + worker target SCCN - docs.yml: pages project nemar-cli -> nemar-docs (SCCN) - backend/services/github.ts: dataset-repo webhook templates to api.nemar.org - scripts/hallu-sync.sh: API_BASE default to api.nemar.org Dry-runs (wrangler@4 with SCCN token) bind to SCCN prod and dev D1 + Vectorize correctly. Existing dataset repos still carry legacy webhook URLs in committed workflow files; will re-roll via nemar admin ci add as a follow-up so DOI/enrich webhooks land on SCCN D1 instead of the personal-account read-only buffer. * Address PR review: drop task refs, fix legacy default - test/e2e-sandbox.test.ts: TEST_API_URL default to SCCN dev so local invocations stop hitting the personal-account read-only buffer - backend/src/index.ts: rewrite the dual-mount comment so /nemar reads as the legacy buffer route, not "production" - workflow comments: strip "Phase 10 / Epic #314" annotations from catalog-sync, deploy-backend (x2), and docs per CLAUDE.md no-task-refs
- src/lib/config.ts: wrap migrateApiUrl write in try/catch + log (previously a Conf write failure aborted CLI startup with raw stack) - backend/services/email.ts: warn once when FROM_EMAIL is unset and resolveEmailConfig falls back to the legacy osc.earth default; on accounts that don't verify osc.earth this masks a deploy bug - test/workflow-yaml.test.ts: assert webhook templates target api.nemar.org and never api.osc.earth; URL regression now caught - test/api.test.ts: assert /health version equals root package.json (drift between root and backend manifests was masked by toBeDefined) - test/setup.ts: seed NEMAR_CONFIG_DIR to a tmpdir before any import so a future parent-process import of src/lib/config.ts can't capture the developer's real config path - comment cleanup: drop Phase/Epic task refs from wrangler-sccn.toml and src/lib/config.ts; rewrite legacy wrangler.toml header to flag read-only buffer role; tighten version-import comment in index.ts
- email.ts: collapse 3-line concatenated string to single template literal - config.ts: split long console.error across 4 lines for biome formatter
neuromechanist
had a problem deploying
to
development
April 26, 2026 18:45 — with
GitHub Actions
Failure
Contributor
Author
Comprehensive review fixesFour reviewers ran (code-reviewer, comment-analyzer, silent-failure-hunter, pr-test-analyzer). Verdict from code-reviewer: "no blocking cross-cutting issues; ship it." Findings addressed in commits `0b8d65d` + `bd62d16`: Must-fix (silent-failure HIGH + test crit-9/6/7)
Should-fix (silent-failure MEDIUM)
Project convention (CLAUDE.md "no task references in code")
Verified, no action needed (positive findings from code-reviewer)
Open follow-ups (not blocking this PR)
|
CI deploy-dev failed because backend/package.json pinned wrangler@3.91.0
which does not parse \`import ... with { type: "json" }\` (introduced in
PR #353). Bump to wrangler 4.85.0 to match the version used for local
dry-runs and the version recommended by wrangler's own deprecation
warning.
api-test was racing deploy-dev: the tightened /health assertion compared
against the locally-checked-out package.json version while the deployed
worker on dev still ran the previous version. Replace the exact-match
check with a semver shape regex - still catches version=undefined
(the original test gap) without locking to current build.
neuromechanist
temporarily deployed
to
development
April 26, 2026 19:23 — with
GitHub Actions
Inactive
This branch was previously deployed
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
Cuts NEMAR over from the personal Cloudflare account (yooz-labs / shirazi-10f) to the SCCN institutional account. Closes Epic #314 phases 1-10. Phase 11 (old-account cleanup) stays on a 30-90 day timer post-merge per #332.
This is the release PR; merging will:
What ships
Verification (already completed on dev)
Out of scope, follow-up
Test plan