the wake budget is 208 lines: 16k tokens measured, not 16k assumed

WAKE_LINES=256 was converted from Taelin's 16k-token budget at 4 bytes per
token. Dense technical memories run 3.36, so the real document was 19,015
tokens on the live store -- 19% over the number he set, and it needed a
fourth tool call to deliver a 17-line stub.

  256 lines  63,922 bytes  19,015 tokens  4 parts
  208 lines  54,011 bytes  16,393 tokens  3 parts   <- shipped

Nothing is recomputed: the budget only selects which existing lines print.
test.py now reads the budget from memo instead of keeping its own copy.
This commit is contained in:
victortaelin 2026-07-25 18:49:37 -03:00
parent 909e28fec9
commit a6abc264c5
3 changed files with 9 additions and 9 deletions

View file

@ -96,11 +96,11 @@ keeps a block whole when its size is small relative to its age, so **detail is
proportional to recency**, and it spends exactly `WAKE_LINES` lines doing it:
```
10,000 memories, WAKE_LINES = 256:
10,000 memories, WAKE_LINES = 208:
block size: 1 2 4 8 16 32 64 128 256
how many: 54 27 27 27 28 27 27 27 12
└ the last 54, verbatim ───────────▶ the first 3,000, 256:1
how many: 42 21 21 21 22 21 21 21 18
└ the last 42, verbatim ───────────▶ the first 4,600, 256:1
```
The oldest memories are recalled as a vague shape, the newest word for word,
@ -138,7 +138,7 @@ decisions; drop wording.
```
bad worked on the memory system today and made good progress on the design
good OptMem design settled: LOG.txt append-only truth, TREE binary merge
tree of 280-char summaries, wake renders a fixed 256-line document
tree of 280-char summaries, wake renders a fixed 208-line document
```
## Output is delivered in parts
@ -152,7 +152,7 @@ piece:
Codex 10,000 tokens (configurable per call)
```
A 256-line memory is ~64 KB, so a single-shot `memo wake` is mangled
A 208-line memory is ~56 KB, so a single-shot `memo wake` is mangled
everywhere, and silently.
So `memo wake` pages the document into parts that fit all of them
@ -174,7 +174,7 @@ $MEMORY_DIR/
`memo` and are the only home for them.
ENTRY_CHARS=280 longest a memory may be
WAKE_LINES=256 how many lines `memo wake` prints (~16k tokens)
WAKE_LINES=208 how many lines `memo wake` prints (~16k tokens)
PART_CHARS=20000 how much of it fits in one command's output
PART_LINES=500 ...and in how many lines
```

2
memo
View file

@ -21,7 +21,7 @@ sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
from blocks import cover # noqa: E402
ENTRY_CHARS = 280
WAKE_LINES = 256
WAKE_LINES = 208 # ~16k tokens of dense text, in 3 parts
RAW_MAX = 16 # blocks up to this many memories compress from the raw log
# Every harness truncates a command that prints too much, and each drops a

View file

@ -27,8 +27,8 @@ DEFAULTS = {k: getattr(cli, k) for k in
("ENTRY_CHARS", "WAKE_LINES", "PART_CHARS", "PART_LINES")}
N = 2000
WAKE_LINES = 256
PART_CHARS = 20000
WAKE_LINES = cli.WAKE_LINES # the shipped budget, not a second copy of it
PART_CHARS = cli.PART_CHARS
# Verified caps of the harnesses in the wild: Claude Code cuts a command's
# output at 30,000 chars (middle), pi at 50 KB / 2000 lines (head), Codex
# budgets 10,000 tokens. A part must fit the strictest of each kind.