Skip to content

test: guard the public feature graph - #341

Open
jderochervlk wants to merge 1 commit into
codex/option5-helper-cleanupfrom
codex/option5-feature-guardrails
Open

test: guard the public feature graph#341
jderochervlk wants to merge 1 commit into
codex/option5-helper-cleanupfrom
codex/option5-feature-guardrails

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 31 and final PR of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #340.

Summary

  • add npm run check:features to validate the exact 27 supported public features
  • require one unqualified owning folder feature per public feature
  • validate unique source features, source directories, and flat public module files
  • compile every qualified WebAPI.* feature independently
  • run the feature guardrail in CI
  • generate API documentation directly from the rescript.json public module lists
  • replace legacy nested feature/interface docs with flat interface pages
  • document the distinction between consumer feature bundles and flat module paths

Guardrails

The new check fails when:

  • the supported 27-feature list changes unintentionally
  • a source folder uses a qualified public feature name
  • a public feature lacks exactly one owning internal folder feature
  • a public module is duplicated or its source file is missing
  • any supported feature has an incomplete compiler dependency closure

Documentation update

The old documentation pipeline still read the pre-Option-5 migration taxonomy and expected nested interface routes. API pages and navigation now follow the actual flat public surface, producing one page per public interface module.

Temporary state

None from the Option 5 migration remains. Future feature changes should update the explicit contract and pass the per-feature compiler checks in this PR.

Review focus

  • feature-contract assertions
  • per-feature build behavior and CI placement
  • flat API documentation discovery and navigation
  • consumer feature documentation

Verification

  • npm run check:features (all 27 supported features)
  • npm run build
  • npm test
  • npm run build:docs (303 static pages)
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1091517f92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +155 to +159
const runRescript = (args) =>
spawnSync(rescriptExecutable, args, {
cwd: repoRoot,
encoding: "utf8",
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Launch the Windows ReScript shim through cmd.exe

On Windows, this selects rescript.cmd but passes it directly to spawnSync without shell: true or cmd.exe /c. Windows batch shims cannot be executed directly this way, so npm run check:features fails before the first feature build; invoke the shim through the command shell or use a cross-platform executable resolution strategy.

Useful? React with 👍 / 👎.

@jderochervlk
jderochervlk force-pushed the codex/option5-feature-guardrails branch from 1091517 to 987fa29 Compare August 4, 2026 17:31
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