test: pin the capy skill's context budget for the read-view line (5315 -> 5425)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-03 19:23:12 +00:00
1 parent 52283de6e6
commit dc12924740
3 files changed
+7 -2

No files matched your search

@@ -3,4 +3,4 @@
### Changed
- **docs/captain.md** has a new section, "New threads join the crew". A crew thread asks its Captain for a new thread, and the Captain creates it in the crew. A thread the crew thread already made gets reported by code in that turn, so the Captain can add it with `crew.add`. A thread in another project goes Captain to Captain: the receiving Captain creates it in its own crew as work, briefs it and returns the result. Only a project with no Captain lets the crew thread create the thread itself, with the code recorded on the work's issue. The cause: GBRA-240 created GBEV-33 directly in another project, and that thread ran outside every crew.
- **The Capy factory context (`factory.md` point 12)** now has the short version and cites that section. Its byte budget in `test/capy-skill-wrapper.test.ts` goes from 3,300 to 3,450: the page's new size rounded up to the next 25 bytes, and no other point was trimmed.
- **The Capy skill's host adaptations** say that `tools.capy.read` returns about the first 38,000 characters, with each line cut at 2,000. So a read, change and `tools.capy.write` program saves a truncated file, Drive files included. Edit long files with `tools.capy.edit`, or read and write the whole file in bash or Python and check the line count. `tools.drive.history` restores a recent version. This is how the org knowledge base's rules.md lost 37 rules.
- **The Capy skill's host adaptations** say that `tools.capy.read` returns about the first 38,000 characters, with each line cut at 2,000. So a read, change and `tools.capy.write` program saves a truncated file, Drive files included. Edit long files with `tools.capy.edit`, or read and write the whole file in bash or Python and check the line count. `tools.drive.history` restores a recent version. This is how the org knowledge base's rules.md lost 37 rules. The skill's context-budget ceiling (`test/fixtures/context-budget.json`) goes from 5,315 to 5,425 tokens, the measured 5,409 rounded up to the next 25, for this one line.
+5
View File
@@ -23,6 +23,11 @@
* copy-paste): fix the bloat instead.
* 3. After a token-reduction phase lands: re-run the capture so ceilings
* ratchet down and the win is locked against regression.
*
* Hand pin: capy/skill/gstack went from 5315 to 5425 (measured 5409, rounded up
* to the next 25, no headroom) for the host-adaptation line saying
* tools.capy.read returns a cut-down view, so a read-then-write truncates
* (2026-11-03). Raise a hand pin only by what the change needs.
*/
import { describe, test, expect } from 'bun:test';
import * as fs from 'fs';
+1 -1
View File
@@ -9,7 +9,7 @@
"browser-skills/hackernews-frontpage": 371,
"canary": 7738,
"captain": 6551,
"capy/skill/gstack": 5315,
"capy/skill/gstack": 5425,
"careful": 1239,
"codex": 9890,
"context-restore": 6287,