Skip to content

feat: add OAuth staging docker-compose and env template#137

Merged
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
feat/oauth-staging-compose
Apr 1, 2026
Merged

feat: add OAuth staging docker-compose and env template#137
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
feat/oauth-staging-compose

Conversation

@cmeans-claude-dev
Copy link
Copy Markdown
Contributor

@cmeans-claude-dev cmeans-claude-dev Bot commented Mar 31, 2026

Summary

  • Adds docker-compose.oauth.yaml — isolated Docker Compose stack for testing OAuth/WorkOS AuthKit on port 8421 (separate containers, volumes, and tunnel from production)
  • Adds .env.oauth.example — template with all required/optional env vars for staging
  • Adds .env.oauth to .gitignore to prevent committing secrets

QA

Prerequisites

  • Copy .env.oauth.example to .env.oauth and fill in WorkOS values
  • Have a Cloudflare staging tunnel configured (or comment out tunnel-oauth service)

Manual tests (via MCP tools)

    • Stack starts cleanly
    docker compose -f docker-compose.oauth.yaml --env-file .env.oauth up -d
    

    Expected: awareness-oauth, postgres-oauth, and awareness-tunnel-oauth containers running and healthy

    • Briefing responds on staging port
    get_briefing()  # via MCP client pointed at localhost:8421 or staging.mcpawareness.com
    

    Expected: valid briefing JSON (may be empty if fresh database)

    • Production unaffected
    get_briefing()  # via production MCP client
    

    Expected: production briefing still works, separate from staging data

    • Clean teardown
    docker compose -f docker-compose.oauth.yaml down -v
    

    Expected: all staging containers and volumes removed

🤖 Generated with Claude Code

@cmeans-claude-dev cmeans-claude-dev Bot added the Dev Active Developer is actively working on this PR; QA should not start label Mar 31, 2026
@github-actions github-actions Bot added Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA and removed Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels Mar 31, 2026
@cmeans-claude-dev cmeans-claude-dev Bot removed the Dev Active Developer is actively working on this PR; QA should not start label Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cmeans-claude-dev cmeans-claude-dev Bot added the Ready for QA Dev work complete — QA can begin review label Mar 31, 2026
@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label Mar 31, 2026
@cmeans
Copy link
Copy Markdown
Owner

cmeans commented Mar 31, 2026

Adding QA Active — beginning code review and manual verification.

@github-actions github-actions Bot removed the Ready for QA Dev work complete — QA can begin review label Mar 31, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Review — PR #137

CI Status

All checks green: lint ✓, typecheck ✓, tests (3.10/3.11/3.12) ✓, codecov/patch ✓

Code Review Findings

1. SUBSTANTIVE — pull_policy: always contradicts build: .
docker-compose.oauth.yaml:28 — The awareness-oauth service has both build: . and pull_policy: always. pull_policy applies to image pulls, but build triggers a local build. This is misleading. Either remove pull_policy (since you're building), or uncomment the image: line and remove build.

2. SUBSTANTIVE — Shared Ollama volume default between prod and staging
docker-compose.oauth.yaml:131ollama-oauth defaults to ${AWARENESS_OLLAMA_DATA:-~/awareness-ollama}, same as production (docker-compose.yaml:118). The comment says "shares model cache to avoid re-download," but concurrent access from both stacks could corrupt data. Consider defaulting to ~/awareness-ollama-oauth, or documenting mutual exclusion.

3. OBSERVATION — Hardcoded AWARENESS_PUBLIC_URL
docker-compose.oauth.yaml:48AWARENESS_PUBLIC_URL=https://staging.mcpawareness.com is hardcoded rather than parameterized via ${AWARENESS_PUBLIC_URL:-https://staging.mcpawareness.com}. Inconsistent with the pattern used for other variables.

4. NIT — Example issuer in template
.env.oauth.example:5AWARENESS_OAUTH_ISSUER=https://thoughtful-saga-02-staging.authkit.app includes what appears to be a real WorkOS staging domain. Consider using a placeholder like https://your-app.authkit.app.

Manual Test Results

# Test Result
1 Stack starts cleanly (3 containers healthy) PASS
2 Briefing responds on staging port 8421 (JWT auth enforced, valid JSON) PASS
3 Production unaffected on port 8420 PASS
4 Clean teardown (down -v removes all containers/network) PASS

Verdict

4/4 manual tests pass. 2 substantive findings, 1 observation, 1 nit. Substantive items (#1 pull_policy, #2 shared Ollama volume) should be addressed before merge.

@cmeans
Copy link
Copy Markdown
Owner

cmeans commented Mar 31, 2026

QA Audit — 4/4 manual tests pass, CI all green. 2 substantive findings posted in review (pull_policy contradiction, shared Ollama volume). Applying QA Failed pending resolution of substantive items.

@cmeans cmeans added QA Failed QA found issues — needs dev attention and removed QA Active QA is actively reviewing; Dev should not push changes labels Mar 31, 2026
@cmeans-claude-dev cmeans-claude-dev Bot added Dev Active Developer is actively working on this PR; QA should not start and removed QA Failed QA found issues — needs dev attention labels Mar 31, 2026
@github-actions github-actions Bot added the Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA label Mar 31, 2026
@cmeans-claude-dev cmeans-claude-dev Bot added Ready for QA Dev work complete — QA can begin review and removed Dev Active Developer is actively working on this PR; QA should not start labels Mar 31, 2026
@github-actions github-actions Bot removed the Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA label Mar 31, 2026
cmeans-claude-dev[bot] and others added 2 commits March 31, 2026 21:00
Adds an isolated Docker Compose stack for testing OAuth/WorkOS AuthKit
on a separate port (8421) without affecting production. Includes env
template and gitignore for secrets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Remove pull_policy: always — contradicts build: . (SUBSTANTIVE #1)
2. Default Ollama volume to ~/awareness-ollama-oauth to avoid
   concurrent access with production (SUBSTANTIVE #2)
3. Parameterize AWARENESS_PUBLIC_URL with env var (OBSERVATION #3)
4. Replace real WorkOS domain with placeholder in template (NIT #4)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label Apr 1, 2026
@cmeans
Copy link
Copy Markdown
Owner

cmeans commented Apr 1, 2026

Adding QA Active — starting second-round review to verify fixes for findings #1#4.

Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Re-Review — PR #137 (Round 2)

Fix Verification

All 4 findings from Round 1 addressed in commit 85f5bd8:

# Severity Finding Status
1 SUBSTANTIVE pull_policy: always contradicts build: . FIXEDpull_policy removed
2 SUBSTANTIVE Shared Ollama volume default FIXED — defaults to ~/awareness-ollama-oauth, comment clarifies isolation
3 OBSERVATION Hardcoded AWARENESS_PUBLIC_URL FIXED — parameterized via ${AWARENESS_PUBLIC_URL:-...}
4 NIT Real WorkOS domain in template FIXED — replaced with https://your-app.authkit.app

Additional Scan

No new issues introduced by fix commit. Verified:

  • Localhost-only port binding preserved (127.0.0.1:8421:8421)
  • Required env vars still use ?Set ... error syntax
  • Postgres volume still isolated (~/awareness-oauth-pg)
  • Resource limits and healthchecks intact
  • Ollama behind profiles: [embeddings]

CI Status

All checks green: lint ✓, typecheck ✓, tests (3.10/3.11/3.12) ✓, codecov/patch ✓

Verdict

0 open findings. All substantive issues resolved. PR is ready for signoff.

@cmeans
Copy link
Copy Markdown
Owner

cmeans commented Apr 1, 2026

QA Audit (Round 2) — All 4 round-1 findings verified fixed. CI all green. 0 open findings. Applying Ready for QA Signoff.

@cmeans cmeans added Ready for QA Signoff QA passed — ready for maintainer final review and merge and removed QA Active QA is actively reviewing; Dev should not push changes labels Apr 1, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmeans cmeans removed Ready for QA Dev work complete — QA can begin review Ready for QA Signoff QA passed — ready for maintainer final review and merge labels Apr 1, 2026
@cmeans cmeans added the QA Approved Manual QA testing completed and passed label Apr 1, 2026
@cmeans cmeans force-pushed the feat/oauth-staging-compose branch from 85f5bd8 to 04abe40 Compare April 1, 2026 02:11
@github-actions github-actions Bot added Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA Ready for QA Dev work complete — QA can begin review and removed QA Approved Manual QA testing completed and passed Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels Apr 1, 2026
@cmeans-claude-dev cmeans-claude-dev Bot merged commit 6fa89de into main Apr 1, 2026
11 checks passed
@cmeans-claude-dev cmeans-claude-dev Bot deleted the feat/oauth-staging-compose branch April 1, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for QA Dev work complete — QA can begin review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant