mirror of
https://github.com/efiten/coredrive-rx.git
synced 2026-11-24 13:27:59 +00:00
AGENTS.md said every tag must carry a "What's New" body, cumulative, newest first. That rule was a human convention and it was missed on twelve tags in a row: v1.6.0 through v1.10.3 all shipped the CI-generated changelog link, so v1.5.0 was the last release anyone could read while region discovery, the airtime budget, the retry backoff, the FLOOD-reply warning and the AES padding fix all landed unannounced. v1.11.3 went the same way earlier today until it was caught by hand, which is the argument against leaving it to whoever is paying attention. Each release now has docs/releases/vX.Y.Z.md, written in the same commit as the version bump, so the notes are reviewed in git rather than typed into a web form afterwards. scripts/release-notes.mjs concatenates every file from a given tag downwards, newest first, and the release workflow publishes that as the body. A tag whose file is missing fails the job before the build even starts, so a release without notes cannot be published at all. generate_release_notes is gone. The 25 files are a split of the cumulative body that v1.12.0 already carried, so no section was rewritten. Verified by reassembling v1.12.0 from the files and diffing it against the published body: identical once separators and blank lines are normalised. Ordering is the one thing an assembler can get quietly wrong, and it has a test: sorting tags as strings puts v1.9.1 above v1.10.0 and would drop a release out of the middle of every body. Refusing an unknown tag has a test too, because that refusal is the whole gate. Not done: the bodies of v1.5.0 and older are left as they are, and no release title was changed. The workflow change is unexercised until the next tag is pushed. Tests: 260 pass (+5). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Manrn3qdrTJFz3C4o9PPFL
3.1 KiB
3.1 KiB
AGENTS.md — coredrive-rx contributor rules
Standalone companion app for CoreScope. NOT governed by CoreScope's AGENTS.md — this repo has its own conventions below.
Stack & layout
- Vanilla JS (ES modules) + Vite. MQTT.js over WSS. Web Bluetooth,
navigator.geolocation, IndexedDB. src/is split by responsibility:transport(BLE),frames/meshpacket(parsing),gps,queue(IndexedDB),publisher(MQTT),names(resolve),config(runtime config),app(wiring/UI).- Tests live in
test/*.test.mjs, run withnode --test(npm test). Add a test with every logic change.
Configuration (runtime, not build-time)
- All per-deployment values live in a runtime
config.json(served next toindex.html), loaded bysrc/config.jsat startup. Shape: seeconfig.example.json. - Do NOT reintroduce
VITE_*/.envfor deployment config, and never hardcode hostnames, URLs, or credentials in source. - Secrets live ONLY in the gitignored
config.json— never commit them, never surface them in the UI.
Data-integrity invariant (do not weaken)
- Record only what the companion heard itself and directly: a 0-hop advert's full pubkey, or
path[last](the last forwarder) for FLOOD routes. Discard upstream hops. Require ≥2-byte path-hash. - The MQTT payload shape is a contract with CoreScope's ingestor (
docs/client-rx-coverage.mdin the CoreScope repo). Changing it is a breaking change → major version bump.
Workflow
- Semantic versioning in
package.json. Tag each releasegit tag vX.Y.Zandgit push --tags. patch = fix/tweak, minor = backward-compatible feature, major = breaking (e.g. payload contract). - Every release tag MUST have a "What's New" body, written as
docs/releases/vX.Y.Z.mdin the SAME commit as the version bump. One file, one release: a# CoreDrive RX vX.Y.Zheading, a one-line summary, a "What's new" bullet list (user-facing changes), and "Upgrade notes" (SW cache bump, any data/config migration). So anyone reading the tag sees what changed without diffing. - Notes are CUMULATIVE, and that is now mechanical rather than remembered:
scripts/release-notes.mjs <tag>concatenates every release file from that tag downwards, newest first, and.github/workflows/release.ymlpublishes the result as the body. A tag whose file is missing FAILS the release job instead of shipping a changelog link. This rule was a human convention for nine tags in a row and was missed on every one of them, which left v1.5.0 as the last release anyone could read while region discovery landed unannounced. - To change a published body, edit the file under
docs/releases/and re-post it:node scripts/release-notes.mjs vX.Y.Z | gh release edit vX.Y.Z --repo efiten/coredrive-rx --notes-file -. - Commit AND push every change, with a descriptive message. Keep GitHub mirrored.
- PWA cache discipline: the service worker is network-first;
index.html,sw.js,manifest, andconfig.jsonmust be servedno-cache;/assets/is immutable. - Web Bluetooth needs a secure context — test over HTTPS or
localhost.