Skip to content

docs: correct stale setup and testing guidance - #105

Merged
mroderick merged 1 commit into
mainfrom
docs/refresh-stale-guidance
Nov 11, 2026
Merged

mroderick merged 1 commit into
mainfrom
docs/refresh-stale-guidance

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

AGENTS.md tells a new contributor to use node:test, a SQLite database, port 3000, and three test directories that do not exist. README.md repeats the SQLite and port claims. Both now match the code.

What was wrong, and what it says now:

  • Database: SQLite and ./auth.db anywhere in the file. The app has used PostgreSQL only since the migration; DATABASE_URL defaults to postgres://auth:auth@localhost:5433/test.
  • Test framework: node:test and node:assert. All 16 test files use tap, and .taprc sets allow-incomplete-coverage: true, so the four invented coverage thresholds are gone too.
  • Test directories: test/auth/, test/routes/, test/components/ and a test/helpers/app.js that does not exist. The real layout is test/features/, test/integration/, test/unit/ and three helpers.
  • Port: 3000 in both files. The app listens on 3001 (AUTH_DEFAULT_PORT); 3000 is the planner.
  • Allowed redirects: a ["http://localhost:3000/demo"] whitelist at config.js:6. It is PLANNER_REDIRECT_URIS, defaulting to the planner callback.
  • Magic links: "no email sending configured". Production sends them through SendGrid; the console logging and the /api/test/magic-links route are development only.
  • Plugins: magic links and admin. The JWT and OAuth provider plugins were missing, though the provider is the service's main job.
  • Stale line references throughout the architecture notes, plus the source tree missing src/auth/, src/dev/ and src/app/db/.

One addition: pretest starts the container with apple/container, which is macOS-only, so npm test fails at that step on Linux. The file now says to start PostgreSQL yourself and run npx tap.

Review notes

Every claim in the diff was checked against the source rather than rewritten from memory: src/config.js for ports, defaults and redirects, src/auth.js and src/app/app.js for line references, package.json and .taprc for the test setup, and a test run for the stderr messages the Testing section now lists.

docs/plans/ still contains design documents that describe SQLite. Those are dated records of past decisions, not guidance, so they are untouched.

AGENTS.md and README.md still described SQLite, node:test, test/auth,
test/routes and test/components, port 3000, a /demo redirect whitelist,
and magic links as console-only. The app runs on PostgreSQL, the suite
uses tap, the test directories are features, unit and integration, the
app listens on 3001, allowed redirects come from PLANNER_REDIRECT_URIS,
and production magic links go through SendGrid.

Line references in the architecture notes now point at the current code.
@mroderick
mroderick marked this pull request as ready for review November 11, 2026 16:29
@mroderick
mroderick merged commit 41b9252 into main Nov 11, 2026
7 checks passed
@mroderick
mroderick deleted the docs/refresh-stale-guidance branch November 11, 2026 17:21
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.

2 participants