Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
5ca0b4b
feat(notion-api): add reusable modules for Notion operations
luandro Feb 6, 2026
4b4cf4c
test(notion-fetch): add module purity documentation test suite
luandro Feb 6, 2026
b58aaa1
feat(api-server): add Bun API server for Notion job management
luandro Feb 6, 2026
4cec246
test(api-server): add API routes validation test suite
luandro Feb 6, 2026
300d788
feat(api-server): add job queue with concurrency limits and cancellation
luandro Feb 6, 2026
ddc7218
test(api-server): add concurrent request behavior tests for job queue
luandro Feb 6, 2026
fe33ac8
feat(api-server): add job status persistence and log capture for obse…
luandro Feb 6, 2026
d9ddb47
feat(api-server): add job filtering and cancellation endpoints
luandro Feb 6, 2026
533a647
test(api-server): add endpoint minimality and sufficiency validation
luandro Feb 6, 2026
6f4d83a
docs(prd): add api-driven notion ops plan
luandro Feb 6, 2026
5367124
feat(api-server): add input validation and error handling
luandro Feb 6, 2026
60db85a
feat(errors): add unified error handling with actionable messages
luandro Feb 6, 2026
a62da0e
feat(api-server): add API key authentication and request auditing
luandro Feb 6, 2026
a9f807e
feat(api-server): add GitHub status reporting callbacks for job compl…
luandro Feb 6, 2026
b95d8f4
test(api-server): add GitHub status idempotency and integration tests
luandro Feb 6, 2026
3bb1de4
docs(developer-tools): add API and CLI reference documentation
luandro Feb 6, 2026
22f3b59
feat(api-server): add /docs endpoint with OpenAPI specification
luandro Feb 6, 2026
8a18c56
feat(api-server): add standardized response schemas for automation
luandro Feb 6, 2026
ac1337d
refactor(api-server): remove unused response schema interfaces
luandro Feb 6, 2026
2c4f09c
test(api-server): add unit tests for module extraction and core job l…
luandro Feb 6, 2026
b238a50
test(api-server): add integration tests for API endpoints and job queue
luandro Feb 7, 2026
05a87c6
test(api-server): add comprehensive tests for auth middleware and aud…
luandro Feb 7, 2026
863086a
test(api-server): add validation functions for auth failures and audi…
luandro Feb 7, 2026
771ce10
feat(api-server): add Docker deployment configuration
luandro Feb 7, 2026
304f844
feat(docker): optimize container size and add configurability
luandro Feb 7, 2026
d4c4039
feat(workflow): add GitHub Action to call API for Notion fetch operat…
luandro Feb 7, 2026
4cec2d7
test(api-server): add VPS deployment documentation tests
luandro Feb 7, 2026
32c7553
docs(scripts): add comprehensive scripts inventory document
luandro Feb 7, 2026
e1fc8cc
chore(api): add reviewer prd and deployment validation docs
luandro Feb 7, 2026
1f70d15
chore(prd): normalize active and archived prd flow
luandro Feb 7, 2026
696611b
feat(scripts): add generated-content policy verification script
luandro Feb 7, 2026
73889dc
test(api-server): validate job queue concurrency, cancellation, and s…
luandro Feb 7, 2026
f5fff6f
test(api-server): add deterministic and recoverable persistence tests
luandro Feb 7, 2026
9ca8021
test(api-server): add comprehensive endpoint schema validation tests
luandro Feb 7, 2026
3df7256
test(api-server): add authentication middleware integration tests
luandro Feb 7, 2026
8489a65
test(api-server): add integration tests for audit logging
luandro Feb 7, 2026
7779f85
feat(api-server): add GitHub status idempotency tracking
luandro Feb 7, 2026
fc5151f
docs: add generated-content policy compliance report
luandro Feb 7, 2026
53c743b
test(api-server): fix API routes validation test to match actual impl…
luandro Feb 7, 2026
88dcfb1
test(api-server): add comprehensive job queue behavior validation tests
luandro Feb 7, 2026
02388f8
fix(policy): update verification script to recognize hand-crafted docs
luandro Feb 7, 2026
c3d2941
test(api-server): fix job list response shape validation
luandro Feb 8, 2026
592288f
test(api-server): improve job persistence test isolation and determinism
luandro Feb 8, 2026
583290c
test(verify-generated-content-policy): fix promise await warning
luandro Feb 8, 2026
9b4435e
test(api-server): add comprehensive GitHub status callback flow valid…
luandro Feb 8, 2026
c7569f3
feat(api-server): add centralized Zod-based validation schemas
luandro Feb 8, 2026
4b05533
test(api-server): add authentication middleware coverage for protecte…
luandro Feb 8, 2026
268eeaa
test(api-server): add endpoint schema validation tests
luandro Feb 8, 2026
9ed78ec
docs(api-server): validate and fix API documentation against implemen…
luandro Feb 8, 2026
ab13c2d
docs(runbook): refactor API service deployment for first-time operators
luandro Feb 8, 2026
887950b
docs(deployment): add existing stack integration guidance
luandro Feb 8, 2026
54f6c6c
docs(deployment): expand GitHub integration guidance with all secrets…
luandro Feb 8, 2026
f58dc48
test: add missing beforeAll import to deployment-runbook test
luandro Feb 8, 2026
77f3f45
docs(deployment): expand GitHub integration guidance with all secrets…
luandro Feb 8, 2026
8e500aa
test(api-server): remove redundant assertions from docker-config.test.ts
luandro Feb 8, 2026
03be644
fix(job-persistence): add retry logic for concurrent file access
luandro Feb 8, 2026
17ba60e
test(api-server): remove low-signal assertions and improve test quality
luandro Feb 8, 2026
1555ab0
test(api-server): implement deterministic isolation for persistence p…
luandro Feb 8, 2026
68f4bdf
test(api-server): add regression tests for persistence and queue stab…
luandro Feb 8, 2026
5700e5f
docs: add test execution evidence report
luandro Feb 8, 2026
06023e3
test(api-server): add executable command validation for deployment docs
luandro Feb 8, 2026
39f5f40
test(api-server): add production security validation tests for Docker
luandro Feb 8, 2026
788f572
test(api-server): implement Docker runtime smoke validation tests
luandro Feb 8, 2026
d55527b
test(api-server): add GitHub Actions secret handling validation tests
luandro Feb 8, 2026
a364518
docs(developer-tools): add comprehensive GitHub setup guide
luandro Feb 8, 2026
37f7310
docs: approve production checklist completeness and operational readi…
luandro Feb 8, 2026
d03076c
fix(api-server): address PR #126 review feedback
luandro Feb 8, 2026
a2a4bd2
chore: reorganize root documentation and archive completed reviews
luandro Feb 8, 2026
4d9a3cd
chore: archive resolved flaky-test reports and obsolete root docs
luandro Feb 8, 2026
b92f399
chore: ignore test-results directory and fix docker integration tests
luandro Feb 8, 2026
3e21654
fix(docker): correct pngquant symlink ordering and exclude test files
luandro Feb 8, 2026
6719254
docs: complete Task 0 investigation and update PRD with findings
luandro Feb 8, 2026
6b2f663
fix(docker): add jpegtran symlink, fix volume permissions, increase t…
luandro Feb 8, 2026
c539bf9
test(fetchAll): export buildStatusFilter and add comprehensive tests
luandro Feb 8, 2026
4b17250
docs: mark Task 1 complete in PRD (buildStatusFilter export)
luandro Feb 8, 2026
e006938
fix(typescript): resolve ESLint config type inference errors
luandro Feb 8, 2026
9e43ddd
feat(api-server): add notion:count-pages job type
luandro Feb 8, 2026
d92f22d
test: fix fetchPage tests to properly mock enhancedNotion
luandro Feb 8, 2026
5abb2ce
feat(api-server): add notion:count-pages job type
luandro Feb 8, 2026
3c134f2
feat(notion-fetch): add --status-filter flag to CLI
luandro Feb 8, 2026
c2a8304
feat(test): add page count validation to test-fetch.sh
luandro Feb 8, 2026
2accd70
test: add unit tests for validate_page_count function
luandro Feb 9, 2026
05d2360
fix(test): --max-pages N correctly adjusts expected count to min(N, t…
luandro Feb 9, 2026
bf24012
feat(comparison-engine): add diagnostic output for mismatch debugging
luandro Feb 9, 2026
fc96d24
test: add graceful degradation test case for count job failure
luandro Feb 9, 2026
38f7b85
feat(api-server): implement JSON extraction from mixed log output
luandro Feb 9, 2026
8afa25c
feat(notion-count-pages): add graceful handling of missing environmen…
luandro Feb 9, 2026
71619c8
test: fix TypeScript errors in test files
luandro Feb 9, 2026
c209d06
test: add integration tests for notion-count-pages
luandro Feb 9, 2026
3367104
test: fix notion-count-pages test failures and improve test reliability
luandro Feb 9, 2026
2eafcbb
test: add comprehensive validation for count output clarity
luandro Feb 9, 2026
0602ad2
feat(api-server): add notion:count-pages job type to VALID_JOB_TYPES
luandro Feb 9, 2026
1265c94
fix(test-docker): compare markdown files against expectedDocs instead…
luandro Feb 9, 2026
9256d5f
fix(test-docker): increase --all timeout to 1h and detect incomplete …
luandro Feb 9, 2026
2b03692
chore: remove personal development tool artifacts and cache files
luandro Feb 9, 2026
c846914
chore: remove tracked .log and .skill files from git
luandro Feb 9, 2026
24573a7
refactor(context): move developer-tools docs from docs/ to context/
luandro Feb 9, 2026
22b32a8
chore: remove developer-tools docs and update project context
luandro Feb 9, 2026
0a80784
docs: add PRD documents for PR #126 review and Docker Hub deployment
luandro Feb 9, 2026
9f1992e
docs: add API review and test improvement plans
luandro Feb 9, 2026
eff497d
test: add Docker API integration test script
luandro Feb 9, 2026
f1917f2
types: add Bun TypeScript type definitions
luandro Feb 9, 2026
37164cf
docs(deployment): add tagging strategies documentation for production…
luandro Feb 9, 2026
227a09d
test(docker): add path filtering validation tests and research docume…
luandro Feb 9, 2026
4a5e19c
feat(docker): add Docker Hub repository verification and research docs
luandro Feb 9, 2026
1032ff5
docs(docker): add multi-platform GitHub Actions build research
luandro Feb 9, 2026
2724920
docs(docker): add Docker Hub auth patterns research and tests
luandro Feb 9, 2026
e03e658
docs(docker): add Docker tagging strategy research and tests
luandro Feb 9, 2026
8c0ce9f
docs: add comprehensive GitHub repository setup guide
luandro Feb 9, 2026
bce9c7f
feat(ci): add Docker publish workflow with multi-platform build
luandro Feb 9, 2026
b151dc9
ci(docker): pin action SHAs and improve PR comment style
luandro Feb 9, 2026
8b3be1a
test(api-server): fix 20 failing tests and improve test infrastructure
luandro Feb 9, 2026
66b44b0
fix(ci): publish docker images for same-repo prs
luandro Feb 9, 2026
b5a3752
feat(ci): add slack notifications for docker publish
luandro Feb 9, 2026
c21a195
fix(ci): use env var guard for slack webhook
luandro Feb 9, 2026
b6f505a
ci: update github actions to latest major versions
luandro Feb 9, 2026
2b40e4d
chore(ci): broaden docker triggers and lint workflow
luandro Feb 9, 2026
90aec69
fix(ci): scope actionlint to docker publish workflow
luandro Feb 9, 2026
9197add
fix(ci): remove undefined input reference in clean-content workflow
luandro Feb 9, 2026
ff18ee7
refactor(api-server): batch 1 cleanup - remove dead code, consolidate…
luandro Feb 9, 2026
bcafce8
fix(api-server): batch 2 - security hardening, test fixes, and env is…
luandro Feb 9, 2026
7b3ad18
feat(api-server): batch 3 - job timeout, log rotation, workflow secur…
luandro Feb 9, 2026
ef3b783
refactor(api-server): batch 4 - persistence safety, modular architect…
luandro Feb 10, 2026
4739831
fix(api-server): use actual process exit for SIGKILL escalation decision
luandro Feb 10, 2026
9bbd183
fix(api-server): validate and harden JOB_TIMEOUT_MS parsing
luandro Feb 10, 2026
1557b46
fix(api-server): remove NODE_ENV=test from workflow local mode
luandro Feb 10, 2026
fda4a1a
fix(api-server): align Docker integration test with cancellation cont…
luandro Feb 10, 2026
6ed4ffb
fix(api-server): clarify CORS behavior for disallowed origins
luandro Feb 10, 2026
9da0092
fix(api-server): reconcile CHILD_ENV_WHITELIST with runtime requirements
luandro Feb 10, 2026
787fb8d
fix(api-server): resolve all API review remaining issues
luandro Feb 11, 2026
f5e42f5
chore: reorganize PRD documents with descriptive names
luandro Feb 11, 2026
b5032f6
docs: add test script security audit findings
luandro Feb 11, 2026
b85b5db
fix(ci): restore docker-publish workflow test contract (#130)
luandro Feb 12, 2026
5170b0e
fix(api-server): run mutating jobs via content task wrapper (#131)
luandro Feb 12, 2026
fb0cfa6
test(ci): tighten docker publish workflow validation assertions (#132)
luandro Feb 12, 2026
be03f0c
Codex-generated pull request (#129)
luandro Feb 12, 2026
7c16883
fix(docker): resolve NanoCPUs error and improve test script reliability
luandro Feb 12, 2026
b870677
fix(api-server): correctly handle job exit codes and improve test script
luandro Feb 13, 2026
2ac12bc
fix(api-server): remove dead code in exit code handling
luandro Feb 13, 2026
0d2004b
fix(api-server): simplify error handling in job executor
luandro Feb 13, 2026
fd88bc7
feat(api): persist notion-fetch output to volume for content branch
luandro Feb 13, 2026
a4924c7
fix(notion-fetch): sort pagesByLang by Order property for correct ToC
luandro Feb 15, 2026
8758476
fix(eslint): disable detect-object-injection for Notion API scripts
luandro Feb 15, 2026
c37ba61
chore: remove GitHub workflows replaced by Notion API
luandro Feb 15, 2026
51047f7
feat(scripts): add stale lock detection and status filter improvements
luandro Feb 15, 2026
e1e3206
refactor: move api-server from scripts/ to top-level directory
luandro Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# ============================================
# .dockerignore for Comapeo Docs API Server
# Minimizes Docker context size by excluding unnecessary files
# ============================================

# Dependencies (installed in container via package.json)
node_modules
npm-debug.log*
yarn-error.log*
package-lock.json
yarn.lock
pnpm-lock.yaml

# Build outputs and caches
build/
dist/
.out/
.docusaurus/
.cache-loader/
*.tsbuildinfo

# ============================================
# Content Generation (not needed for API server)
# ============================================
# Generated content from Notion (synced from content branch)
docs/
i18n/
static/images/

# ============================================
# Development & Testing (not needed in production)
# ============================================
# Test files and coverage
coverage/
test-results*.json
test-results*.html
*.test.ts
*.test.tsx
*.spec.ts
vitest.config.ts
__tests__/

# Development configuration
.eslintrc*
.prettierrc*
.prettierignore
lefthook.yml

# CI/CD
.github/
.gitlab-ci.yml
.azure-pipelines.yml
.circleci/

# ============================================
# Documentation & Assets (not needed for API)
# ============================================
# Project documentation
README.md
CONTRIBUTING.md
CHANGELOG.md
LICENSE
context/
NOTION_FETCH_ARCHITECTURE.md

# Assets not needed for API server
assets/
favicon.*
robots.txt

# ============================================
# Development Directories (not needed in container)
# ============================================
# Git
.git/
.gitignore
.gitattributes

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.marscode/
.eclipse/

# Worktrees and development directories
worktrees/
.dev-docs/

# ============================================
# Environment & Secrets (use env vars or mounted secrets)
# ============================================
.env
.env.*
!.env.example

# ============================================
# Temporary & Generated Files
# ============================================
# Temporary files
*.tmp
*.temp
*-preview-*.md
.cache/
screenshots/

# Notion exports and emoji files (not needed for API)
notion_*.json

# Runtime metrics and cache files
retry-metrics.json
image-cache.json
image-failures.json

# Job persistence data (mounted as volume)
.jobs-data/

# Audit data (development only)
.audit-data/

# Development planning
TASK.md
NEXT_STEPS.md
PRD.md
TODO.md

# ============================================
# Docker Files (don't include Docker files in image)
# ============================================
Dockerfile*
docker-compose*
.dockerignore

# ============================================
# Misc (OS files, logs)
# ============================================
.DS_Store
Thumbs.db
*.log

# ============================================
# Test Directories under scripts/ (explicit)
# ============================================
scripts/test-docker/
scripts/test-scaffold/
scripts/test-utils/
scripts/**/__tests__/
scripts/**/*.test.ts
api-server/**/__tests__/
api-server/**/*.test.ts
29 changes: 29 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,32 @@ MAX_IMAGE_RETRIES=3
# Example:
# TEST_DATA_SOURCE_ID=test-database-id-here
# TEST_MODE=true

# OpenAI Configuration (Required for translation jobs)
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4o-mini

# API Server Configuration (for Docker deployment)
NODE_ENV=production
API_HOST=0.0.0.0
API_PORT=3001

# Content Repository Configuration (required for mutating jobs in API server)
# Required for: notion:fetch, notion:fetch-all, notion:translate
# GitHub repository URL must be HTTPS (no embedded credentials)
GITHUB_REPO_URL=https://github.com/digidem/comapeo-docs.git
# GitHub token with permissions to push to the content branch
GITHUB_TOKEN=your_github_token_here
# Git author identity used for content commits created by jobs
GIT_AUTHOR_NAME=CoMapeo Content Bot
GIT_AUTHOR_EMAIL=content-bot@example.com

# Content repository behavior (optional)
GITHUB_CONTENT_BRANCH=content
WORKDIR=/workspace/repo
COMMIT_MESSAGE_PREFIX=content-bot:
ALLOW_EMPTY_COMMITS=false

# API Authentication (Optional - generate secure keys with: openssl rand -base64 32)
# API_KEY_DEPLOYMENT=your_secure_api_key_here
# API_KEY_GITHUB_ACTIONS=your_github_actions_key_here
Loading
Loading