docs: sweep the docs and comments against the current ecosystem - #196
Merged
Conversation
Checked every cross-repo claim against the current seamless-auth-api (0.7.4,
including its OpenAPI document and .env.example), seamless-templates, the
seamless-auth-server adapters, and the React SDK.
Fixed:
- The local auth-server steps named a script that does not exist (db:migrate).
The auth API spells it migrate:up, and the Docker path runs it at container
start, so say that too.
- init --profile was documented as selecting a profile. It has been accepted
and ignored since managed connect moved to the portal session.
- The generated project layout listed a README.md the CLI does not write, and
omitted seamless.config.json, admin/, and what a managed project skips.
- "No redirects or third-party auth providers" predated OAuth sign-in, which
the CLI has configured since the provider prompts shipped.
- The included-projects list named two repositories. It is four: the adapters
and the React SDK are what the generated api/ and web/ actually run on.
- The verify compose header described one adapter, NODE_ENV=test (the file
itself sets development twenty lines later), a SEAMLESS_ADAPTER_DIR that
does not exist, and a .env.verify that is not written.
- SEAMLESS_REACT_DIR was documented as the default web template source. It is
a single-template override; the default drives every registry web template.
- config set help was missing session_idle_ttl from the string-typed keys.
Added README sections for check and verify. Verify is half of what the CLI
does, ships in the package, and had no coverage at all.
Recorded one real contract drift: WRITABLE_KEYS carries
magic_link_redirect_uris, which the auth API does not accept yet (the key is
defined in @seamless-auth/types on an untagged commit, and the API still
treats the configured origins as the magic-link allowlist). The key stays
listed so a released API needs no CLI change, but the comment and AGENTS.md
now say it is rejected today rather than claiming the lists are in step.
Compressed the repeats rather than rewriting: the --yes/--force rule was
stated four times in init.ts and now has one canonical statement, an identical
rotation-ordering comment at two call sites moved onto the shared helper, and
comments written as diffs ("no longer", "this replaces") now describe the
contract they document.
The scaffold set AUTH_MODE=server in the auth server env and on the admin console container. Nothing reads it: not the auth API, not the admin dashboard (its entrypoint takes only API_URL), and not the web or api templates. The tests now assert its absence, so it cannot come back unnoticed.
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.
Swept the repository's documentation and comments for accuracy, then compressed what was repeated. Every cross-repo claim was checked against the current
seamless-auth-api(0.7.4, including its OpenAPI document and.env.example),seamless-templates, theseamless-auth-serveradapters, andseamless-auth-react.Documentation that had gone stale
npm run db:migratemigrate:up, and the Docker path runs it at container startinit --profilehelpREADME.mdseamless.config.json, andadmin/under--admin=sourceapi/andweb/run onverifycompose headerNODE_ENV=test,SEAMLESS_ADAPTER_DIR,.env.verifydevelopmenttwenty lines below; neither that variable nor that file existsSEAMLESS_REACT_DIR(AGENTS.md, verify.ts)SEAMLESS_TEMPLATES_DIRconfig sethelpsession_idle_ttlNew
README sections for
seamless checkandseamless verify. Verify is half of what the CLI does per AGENTS.md and ships inside the package, but had no README coverage at all.One real contract drift, now written down
WRITABLE_KEYScarriesmagic_link_redirect_urisand claimed to stay in step with the instance's strict patch schema. It does not: the API'sPATCH /system-config/adminhas 16 keys and not that one, the key is defined in@seamless-auth/typeson an untagged commit, and the API's ownmagicLinkRedirect.tssays the dedicated allowlist still needs "a system config key that lives in @seamless-auth/types and a coordinated release". Soconfig set magic_link_redirect_urisfails against every live instance today.The key stays listed, since a released API will then accept it with no CLI change, but the comment and the AGENTS.md maintenance traps now say it is rejected rather than claiming the lists agree.
Dead config removed
The scaffold set
AUTH_MODE=serverin the auth server env and on the admin console container. Nothing reads it: not the auth API, not the admin dashboard (its entrypoint takes onlyAPI_URL), and not the web or api templates. Verified absent from the pinned.env.examplethe CLI fetches, so removing the write changes nothing but the noise. The tests now assert its absence.Compression
Comment quality was already high, so this trims rather than rewrites:
--yes/--forcerule was restated four times ininit.ts. One canonical statement onInitOptions, short notes at each decision.resolveDatabaseUrl.loginFlow.tsandtemplates.tshad comments written as diffs ("no longer", "this replaces"). They now describe the contract they document.Also recorded in AGENTS.md, not changed here
SEAMLESS_AUTH_API_VERSIONisv0.7.1againstv0.7.4released, andSEAMLESS_TEMPLATES_REFisv0.9.0againstv0.11.0.--auth=localclones the auth API at its default branch while--auth=dockerruns a pinned image, so the two modes can scaffold different servers from one CLI version.Still open
Two
TODO(#125)comments (init.ts,login.ts) point at a closed issue, so nothing tracks dropping those deprecation shims. AGENTS.md requires a live ticket. Happy to open one.Checks
npm run build,npm test(977 passing, 4 skipped), andnpm run coverage(99.38% lines) all pass.