Repository navigation
refactor(intent): split seed-calendar.ts under the file-length limit and re-measure the KPI gate (Refs #897) - #904
Conversation
…and re-measure the KPI gate (Refs #897) seed-calendar.ts (1347 lines, since the intent engine PR) becomes four files of 153, 363, 443 and 447 lines: the phrasing building blocks (seed-calendar-vocab), the day/period/next/count/search/when families (seed-calendar-read), the free-time and holiday families (seed-calendar-free), and the calendar picture plus the one calendarFamilies list the seed catalog reads. The moved bodies are byte-identical apart from export keywords. The complete exported seed serializes to the same sha256 before and after (calendarFamilies 20471407d4da23db97213ca7d8f53e5798beb719475d7b141cdfc0ee8021c836, seedFingerprint 77224e79...d007) and 395 tests in the 18 test files that load the seed pass in both trees. The engine digest covers every src/services/intent/*.ts file, so the new files change it (a73f72ff to de45d590). The gate is not edited by hand: it is regenerated by bun --no-env-file scripts/benchmark-intents.ts --gate on the split engine with the unchanged tool, committed scrubbed corpus, labels, split and thresholds (a fresh genuine re-measurement selected under the cleanup authority of #860, not an owner decision). Every measured number reproduces: only the engine digest, the two benchmark result paths and the latency timings differ. The two result files are appended; source.sha is the base commit and dirty is true because the split was uncommitted when it was measured. Related: #827
…905) Format with shfmt; drop the redundant mkdir -m 0700 (umask 077 already makes new directories 0700, existing ones keep their mode); rewrite the apt-get/dpkg-deb check as an explicit if; build the generated SSH_ORIGINAL_COMMAND line without a literal single-quoted expansion. The generated entry is byte identical. Tests pin the entry, new and existing directory modes. Nothing was reinstalled; the installer does not compare file hashes, a later normal run installs this copy. Part of #860
|
Proof record for the seed-calendar.ts split, written from the saved evidence of the run, with the clock taken from the files. Policy: a fresh, real re-measurement was selected under the cleanup authority of #860. It is not an owner comment, and no owner hold was imposed. Re-measurement: the repository tool itself ran Equality of the split: the serialized exported seed in iteration order, the ordered export list, the family names and the pattern keys have the same sha256 before and after (19fc7ef027a3fa8e508cfe5fee1d953cd62207e725b8b8d08b39ac98ceea3ae6). The 18 test files that import the seed give 395 passes and 0 failures on both the baseline and the split tree, and the gate test file gives 16 passes. Not covered by this proof: the sizes of the new files on main and the gate test on the merged tree. They are checked after the merge. Hosted checks on the head 2455a31: the full CI run https://github.com/alex-mextner/HyperCalendarBot/actions/runs/40871715302 and the lint run https://github.com/alex-mextner/HyperCalendarBot/actions/runs/40871715410 succeeded, and the Stage QA run https://github.com/alex-mextner/HyperCalendarBot/actions/runs/40872117870 read passed with 6 cases. The complete Rig aggregate on this tree passed 8 of 8 applicable checks with 1240 of 1240 files covered; its only warning is the generated lockfile at 1343 lines. |
Refs #897
seed-calendar.ts (1347 lines) is the last handwritten file over the 1200-line limit of #860. This PR splits it and regenerates the real-history KPI gate of #827, because the engine digest the gate records covers every src/services/intent/*.ts file.
What changed
The gate re-measurement
Behaviour proof
Whole Rig aggregate
The branch also carries one cherry-picked commit, 2455a31, from the separate ticket #905 (part of #860). It makes scripts/install-stage-qa-browser.sh, which arrived with #899, pass shellcheck and shfmt, with two test files that pin the generated entry. Without it main fails those two checks, so this PR could not show a clean aggregate on its own. It touches no intent file, and nothing was reinstalled on the Stage QA host.
rig lint run --no-setup --jsonon this exact tree (b487d260; Bun 1.4.2, rig 0.73.2, server, 2026-10-29T12:15Z): ok true, complete true, 1240 of 1240 files checked, 8 of 8 applicable checks passed (actionlint, ruff check, ruff format, shellcheck, shfmt, tsc, biome, complexity and file length). In the file-length census seed-calendar.ts is gone; only uv.lock (1343 lines, generated) remains as a warning. Before that commit the same run on f3cfc4c failed only shellcheck and shfmt on that installer.