Skip to content

chore: release infrastructure and runtime hardening for v0.1-alpha#2

Merged
ethanj merged 7 commits intomainfrom
chore/release-infrastructure
Apr 15, 2026
Merged

chore: release infrastructure and runtime hardening for v0.1-alpha#2
ethanj merged 7 commits intomainfrom
chore/release-infrastructure

Conversation

@ethanj
Copy link
Copy Markdown
Contributor

@ethanj ethanj commented Apr 15, 2026

Summary

Release infrastructure and runtime hardening for v0.1.0-alpha.

Phase -1: Repo Rules

  • CLAUDE.md — AI assistant rules matching current architecture

Phase 0: Blockers

  • LICENSE (MIT)
  • Fixed Dockerfile (pnpm → npm)
  • docker-compose.smoke.yml overlay for hermetic CI smoke tests
  • Clean package.json with metadata (repo, homepage, bugs, keywords, engines, license)
  • Fixed vitest config (scoped to src/, updated comment)
  • Regenerated clean package-lock.json

Phase 1: CI & GitHub Infrastructure

  • .github/workflows/ci.yml — typecheck, fallow, tests with Postgres service container
  • .github/workflows/release.yml — tag-triggered release with Docker build verification
  • Issue templates (bug report + feature request YAML forms)
  • PR template with checklist
  • CODEOWNERS

Phase 2: Contributor Docs

  • CONTRIBUTING.md — setup, workflow, code style, scope guidance
  • CODE_OF_CONDUCT.md (Contributor Covenant)
  • CHANGELOG.md (v0.1.0-alpha entry)
  • README: features section, badges, alpha notice, scope statement, contributing link

Phase 3: Runtime Hardening

  • Embedding dimension startup guard (verifies DB matches config)
  • CORS origins ENV-configurable via ALLOWED_ORIGINS
  • Replaced all hardcoded 1536-dim test vectors with config.embeddingDimensions
  • Smoke test uses /memories/ingest/quick (no LLM required for CI)
  • Cleaned stale prototype references

Test plan

  • fallow — 0 issues
  • npx tsc --noEmit — 0 errors
  • npm test — 869 tests pass
  • CI workflow runs green on this PR
  • Docker build succeeds

🤖 Generated with Claude Code

ethanj and others added 7 commits April 15, 2026 15:35
- LICENSE (MIT)
- CLAUDE.md (repo rules for AI assistants)
- CONTRIBUTING.md (setup, workflow, code style)
- CODE_OF_CONDUCT.md (Contributor Covenant)
- CHANGELOG.md (initial v0.1.0-alpha entry)
- .github/workflows/ci.yml (typecheck, fallow, tests with Postgres service)
- .github/workflows/release.yml (tag-triggered release with Docker verification)
- .github/ISSUE_TEMPLATE/ (bug report + feature request YAML forms)
- .github/PULL_REQUEST_TEMPLATE.md
- .github/CODEOWNERS
- Fix Dockerfile (pnpm → npm)
- Add docker-compose.smoke.yml overlay for hermetic CI smoke tests
- Update package.json with metadata (repo, homepage, bugs, keywords, license, engines)
- Fix vitest config (scoped to src/, updated comment)
- Regenerate clean package-lock.json
- Update README with features, badges, scope statement, contributing link

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Port embedding dimension startup guard (verifies DB matches config before serving)
- Make CORS origins ENV-configurable via ALLOWED_ORIGINS
- Replace all hardcoded 1536-dim test vectors with config.embeddingDimensions
- Switch smoke test to /memories/ingest/quick for hermetic CI (no LLM required)
- Clean stale "research prototype" references in docs
- Update .env.example with ALLOWED_ORIGINS documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove genuinely unused exports (getSchemaSQL, clearPlans, setupTestSchema
re-export, generateLegitimateVariations, createSearchPipelineMockContext).
Suppress 2 false positives (factPlans, embeddingPlans) consumed via vi.mock
hoisting that fallow cannot trace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents incremental cache from masking dead-code issues that
surface in CI's clean environment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests require OPENAI_API_KEY, EMBEDDING_DIMENSIONS, and PORT via
dotenv -e .env.test, but .env.test is gitignored. Add placeholder
values directly to the CI env block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ethanj ethanj merged commit 4b71a5c into main Apr 15, 2026
1 check passed
@ethanj ethanj deleted the chore/release-infrastructure branch April 15, 2026 23:00
ethanj added a commit that referenced this pull request Apr 16, 2026
PR #2 merged into research main on 2026-04-14 ~09 UTC, but the core
extraction (7a9b2d5) branched from research commit 3ac0471 which
predates PR #2's merge commit 791c68e. Verified via
`git merge-base --is-ancestor 791c68e 3ac0471` → not ancestor.

Two functional/quality gaps ported:

1. src/services/memory-ingest.ts — fast-AUDN dedup now returns the
   existing memory ID on skip instead of null. Integration sync
   callers rely on this to link to the canonical memory when the
   ingested fact is a near-duplicate.

2. src/routes/route-errors.ts — server-side logging improvements:
   - String(err ?? 'Internal server error') coercion for non-Error
     throwables
   - [status] prefix in the log line for quick severity scanning
   - Full stack trace logged when available

Deliberately NOT ported: PR #2's change to expose err.message to
clients for 500s. Core's consolidated handler returns a generic
'Internal server error' which is the safer default and doesn't leak
internals. Only the server-side log line gets richer.

Validation:
- npx tsc --noEmit: clean
- pnpm test: 876/876 passing
- npx fallow --no-cache: 0 above threshold, maintainability 91.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ethanj added a commit that referenced this pull request Apr 16, 2026
* feat: port remaining atomicmemory-research PR #3 changes to core

Five functional gaps and one test file identified by PR #3 audit:

1. docker-compose.yml: add restart: unless-stopped to postgres service
   (matches app restart policy; prevents DB death from crashing the stack)

2. src/db/repository-read.ts: add sourceSite + episodeId optional filters
   to listMemories() — dynamic parameterized WHERE clauses

3. src/db/memory-repository.ts: thread sourceSite + episodeId through
   repository wrapper

4. src/services/memory-crud.ts + memory-service.ts: thread the same
   params through the crud helper and service facade list() method

5. src/services/memory-ingest.ts: new performStoreVerbatim() — stores
   content as a single memory without fact extraction, for user-created
   text/file uploads

6. src/services/memory-service.ts: add storeVerbatim() facade method

7. src/routes/memories.ts:
   - Add UUID_REGEX constant
   - Add requireUuidParam() and optionalUuidQuery() helpers
   - UUID-validate /:id param on GET, DELETE, and /:id/audit routes
     (was previously letting "not-a-uuid" reach the DB as 500)
   - Add source_site and episode_id filters to GET /list
   - Add skip_extraction branch to POST /ingest/quick routing to
     storeVerbatim instead of quickIngest

8. src/__tests__/route-validation.test.ts: new 129-line test file
   covering UUID validation, filter behavior, and skip_extraction path.
   Mocks embedText to avoid hitting the real embedding provider with
   the CI placeholder OPENAI_API_KEY.

Validation:
- npx tsc --noEmit: clean
- pnpm test: 876 passing, 0 failed (was 869; +7 new tests)
- npx fallow --no-cache: 0 above threshold, maintainability 91.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: port atomicmemory-research PR #2 changes missed by extraction

PR #2 merged into research main on 2026-04-14 ~09 UTC, but the core
extraction (7a9b2d5) branched from research commit 3ac0471 which
predates PR #2's merge commit 791c68e. Verified via
`git merge-base --is-ancestor 791c68e 3ac0471` → not ancestor.

Two functional/quality gaps ported:

1. src/services/memory-ingest.ts — fast-AUDN dedup now returns the
   existing memory ID on skip instead of null. Integration sync
   callers rely on this to link to the canonical memory when the
   ingested fact is a near-duplicate.

2. src/routes/route-errors.ts — server-side logging improvements:
   - String(err ?? 'Internal server error') coercion for non-Error
     throwables
   - [status] prefix in the log line for quick severity scanning
   - Full stack trace logged when available

Deliberately NOT ported: PR #2's change to expose err.message to
clients for 500s. Core's consolidated handler returns a generic
'Internal server error' which is the safer default and doesn't leak
internals. Only the server-side log line gets richer.

Validation:
- npx tsc --noEmit: clean
- pnpm test: 876/876 passing
- npx fallow --no-cache: 0 above threshold, maintainability 91.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(smoke): make docker smoke CI-runnable and side-by-side safe

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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