Repository navigation
chore: AGENTS.md pipeline contract and npm run verify - #95
Conversation
AGENTS.md becomes a short pipeline contract (issue -> branch -> PR -> CI tests-ok -> squash auto-merge), a conflict recipe for generated patches, and the Node 22+ requirement. The nonexistent app/ directory is removed. A repo-root package.json adds npm run verify, which runs what CI runs.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6262d18ec
ℹ️ 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".
| git fetch origin && git merge origin/main # or rebase | ||
| # 1. Resolve conflicts in real sources by hand (core/src/**, core/index.js, tests, docs). | ||
| # 2. Take main's version of the generated patch files: | ||
| git checkout origin/main -- patches/ds-bot |
There was a problem hiding this comment.
Keep hand-authored topic mappings during conflict resolution
When a branch adds or changes a topic mapping, this command replaces the entire patches/ds-bot directory with origin/main, including the hand-authored topics.json and README.md, thereby silently discarding the branch side before regeneration. A newly mapped file then makes generate fail as unmapped, while a moved mapping can regenerate into the wrong patch; restrict the checkout to generated *.patch files and merge topics.json as instructed below.
AGENTS.md reference: AGENTS.md:L27-L29
Useful? React with 👍 / 👎.
| "node": ">=22" | ||
| }, | ||
| "scripts": { | ||
| "verify": "npm --prefix core run lint && node scripts/lint-plugins.mjs && node core/scripts/build-client.mjs --check && node scripts/ds-bot-patches.mjs check && npm --prefix core test && npm --prefix plugins/social test && npm --prefix plugins/tree test" |
There was a problem hiding this comment.
Fail verification when plugin tests are skipped
When either plugin suite skips a test, Node's test runner still exits successfully, so these plain npm test invocations let local npm run verify pass. The PR workflow explicitly parses each plugin's summary and fails unless the skipped count is zero (.github/workflows/test.yml:72-81), meaning this advertised local gate can report completion while required tests-ok later fails; preserve that no-skips check in the helper.
AGENTS.md reference: AGENTS.md:L74-L76
Useful? React with 👍 / 👎.
What
Fixes #N) -> CItests-ok-> auto-merge (squash only), with the existing rules kept (review PASS on the tip; maintainer delegates the merge; stop conditions).patches/ds-bot, rebuildclient.js,node scripts/ds-bot-patches.mjs generate+check.app/references (two places).npm run verify(new repo-rootpackage.json, private, no dependencies,engines.node >=22): core lint (oxlint + arch-docs), plugin lint,build-client.mjs --check,ds-bot-patches.mjs check, core suite,plugins/socialandplugins/treesuites. Same order as CI'sflybot-testsaction plus the patches check from thepackagejob. It does not run pack check, typecheck, actionlint or smoke tests.Why a root
package.jsoninstead ofcore/package.json:core/is generated fromds-bot/+ patches, so editingcore/package.jsonmeans regenerating patch 0007 (a conflict hotspot). The root file touches no shipped package, no lockfile, and dependabot only watches/core.Verified
Node 24.21:
npm run verifyexits 0 (core 674/674, social 68/68, tree 54/54, 0 skipped; lint,--check, patches check, arch-docs OK).Docs-only change plus one helper file; no
core/orpatches/change, so no patch regeneration and no subsystem doc needed (arch-docs OK).