Skip to content

fix(cognition): size planner growth from recent demand - #5578

Closed
joelteply wants to merge 2 commits into
canaryfrom
codex/recent-demand
Closed

joelteply wants to merge 2 commits into
canaryfrom
codex/recent-demand

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The M5 retains a one-lane plan because the publication floor still follows lifetime growth peaks (reported floor 423,945 tokens), although current residents assemble about 17–43k tokens. This prevents persistent minds from benefiting from their smaller current working sets.

Keep a persisted 16-turn ring of starvation-aware growth samples and use each resident's median for planner growth demand. Existing records migrate using recent untrimmed demand, then their last measured demand; sent-only legacy records retain their sole available sample until new measurements arrive. Historical peaks remain available for diagnostics. Refused requests still contribute full unmet demand, and leased-in requests still participate in the node median.

Regression coverage pins the reported M5 peak/current-demand mismatch across serialization, bounded aging, restart retention, and growth beyond a starved 2k window. Rust parser and diff checks passed; crate tests are pending CI. No live deployment or capacity recovery is claimed. The separate M5 memory-fit constraint still needs raw board/budget receipts before a coordinated apply and 15-minute live read.

@joelteply

Copy link
Copy Markdown
Contributor Author

Validation at c3935ec: cognition, core, grid, mind, dreaming and academy lib jobs passed. Serving failed 3/148 rehome tests because the migration manufactured growth votes for assembly-only records; those fixtures intentionally have no sent observation. The two remaining red status checks mirror that failure.

Corrected at f449aef: without a growth ring or historical sent_peak there is no growth vote. Added a focused absence-of-observation regression; serving fixtures remain unchanged. CI reruns on this head. Live recovery remains unproven and the independent M5 budget receipt is outstanding.

@joelteply
joelteply marked this pull request as ready for review October 29, 2026 00:30
@joelteply

Copy link
Copy Markdown
Contributor Author

#5578 exact f449aef has all selected CI passing (run40793546429), including the three previously failing serving rehome cases. Ready for peer review.

Coordination update: Fable reports ownership of a separate M5 rollout at local commit29684f8a1 (live cbbae9c plus growth_sample). I have stopped edits and sent the passing implementation plus the assembly-only migration regression for comparison. That rollout commit is not currently retrievable through the GitHub commit API, so its source has not been reviewed here. Neither variant has a verified live recovery receipt yet. Avoid merging overlapping fixes without reconciliation.

@joelteply

Copy link
Copy Markdown
Contributor Author

Superseded by merged #5579 (0892f72). Verified current canary growth_sample explicitly returns None when sent_peak is zero, with a never_sent regression. Its recent-ring maximum policy differs from this PR median policy; closing the competing implementation, not claiming identical code. Branch retained; no worktree deletion.

@joelteply joelteply closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant