Repository navigation
Conflict-proof the generated patches, CHANGELOG and core docs (Phase 1, PR A) - #103
Conversation
…aders, new files stored whole Two branches that edit the same core file used to conflict in patches/ds-bot on the 'index <hash>' lines, the '@@ -0,0 +1,N @@' line count of a new file and the new-side start of every later hunk. generate now writes edits to upstream files without index lines and with each hunk's new-side start set to its old-side start (a position hint; generate proves every file still reproduces core/), and stores files that upstream does not have verbatim in patches/ds-bot/files/. check also compares the executable bit. New files need no topics.json entry any more. Docs-not-needed: the docs follow in the docs-split commit of this PR
… at release Every PR appended at the top of the same [Unreleased] section. A change now adds changelog.d/<name>.<kind>.md; '.github/scripts/changelog.mjs release <version>' folds the fragments (and any entries still under [Unreleased]) into a release section. CI checks the fragments; changelog.d/** is T1 in the risk rules. Docs-not-needed: the docs follow in the docs-split commit of this PR
…tch page arch-docs forced every PR that touched core/ to edit docs/subsystems/ds-bot-core.md (16 of the last 30 merges). The server and browser code now have their own pages, the generated patches are no longer owned, and invariants sit under headings so parallel PRs append in different places.
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: 3896928e6b
ℹ️ 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".
| const changed = [...new Set([...upstream, ...core])].sort().filter(f => !upstream.has(f) || !core.has(f) || | ||
| !readFileSync(join(ROOT, UPSTREAM, f)).equals(readFileSync(join(ROOT, CORE, f)))) |
There was a problem hiding this comment.
Include executable-bit-only changes when generating patches
When an existing upstream file changes only its executable bit, this content-only changed filter omits it entirely. For example, making core/src/client/about.js executable and running generate produces no patch change, after which check fails with executable bit differs from ds-bot/ + patches; therefore the prescribed generate/check workflow cannot represent a valid mode-only core change. Include mode differences in changed so the generated diff records them.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
| const section = `## [${version}] - ${date}\n\n${lead ? `${lead}\n\n` : ''}${renderKinds(kinds)}\n\n` | ||
| return `${changelog.slice(0, afterHeading)}\n${section}${changelog.slice(end)}` |
There was a problem hiding this comment.
Update changelog comparison references during release
On every release, this inserts the new version section but leaves the reference definitions at the bottom of CHANGELOG.md unchanged. Releasing 0.1.1 from the committed changelog therefore leaves [Unreleased] comparing v0.1.0...HEAD and creates no [0.1.1] reference, so the Unreleased link continues to include already released changes and the new version heading is not linked. The release operation should add the version comparison reference and advance the Unreleased base tag.
Useful? React with 👍 / 👎.
Phase 1, PR A of 3 (conflict-proofing, from the measured hotspots in the speed-up plan). No behavior change to FlyBot itself; three commits, one per hotspot.
What changed
generatewrites edits to upstream files withoutindex <hash>lines and with each hunk's new-side start set to its old-side start (git's position hint; the old side is fixed by the pristine upstream, the true new side moves with every hunk above). Files upstream does not have go whole intopatches/ds-bot/files/instead of one@@ -0,0 +1,N @@hunk whose N changes with every edit; they need notopics.jsonentry.generateapplies each file's diff alone and compares it withcore/before writing;checkalso compares the executable bit. 29 files moved; 4 patches that only added files are gone.changelog.d/<name>.<kind>.md;.github/scripts/changelog.mjs check|preview|release <version>(no network, no shell). CIpackagejob runscheck. Existing[Unreleased]entries stay and are folded in at release.changelog.d/**is T1 inrisk-rules.json.ds-bot-core.mdsplit intocore-host,core-clientand a small pin/patch page; generatedpatches/ds-bot/*.patch|files|topics.jsonare no longer owned (so a core change does not force a doc edit for them). Invariants sit under headings so PRs append in different places.Evidence (replays in /workspace on the box; scripts: conflict-replay.sh, docs-hotspot-replay.mjs)
patches/ds-bot/0002-flybot-api-host.patch, 4 regions: threeindex <hash>lines, the new-file@@ -0,0 +1,802 @@vs+1,803, and a shifted hunk header+539,7vs+540,6.ds-bot-patches.mjs checkpasses on the merged tree without regenerating; both edits present.ds-bot-core.md16 → 3; newcore-host10,core-client7.Verification at the tip
Tip SHA: 3896928 (CI green: test, plugins x2, package, tests-ok)
Ran:
npm run verify(Node 24), actionlint,check-pack.mjs, new tests (ds-bot-patches.test.mjs,changelog.test.mjs)Not run (and why): smoke test (no host code changed); typecheck step (types untouched)
Not done / follow-ups
core/client.jsand0008-client-bundle.patchstill conflict whenever two PRs change the client (generated bundle; build it instead of patching it). Out of scope.generatefalls back to exact numbers for that file (never hit on current patches).patches/ds-bot, rungenerate(AGENTS.md recipe).