# 1.8.9b14 — Wiki upkeep that finishes

An opt-in preview on the 1.8.9 fix line
([#1722](https://github.com/openonion/connectonion/issues/1722)). Stable is 1.8.8.

These fixes come from the owner's own notebook, which ran every night from
25 to 27 September. We measured before and after on a copy of that notebook,
using the same material.

## One page per turn

The nightly update used to hand one model turn the whole notebook, 1,187 pages,
and let it decide what to change. On one real batch of 40 messages it found
eight pages, spent twenty minutes planning and rewriting them, and timed out
with nothing saved. It did that twice.

Now a script finds the pages the material concerns: the project whose folder
the sessions ran in, and the people and projects the material names. Your own
page and addresses that may be yours are skipped, because your name is in
every session. The model then updates one page per turn. Each page is checked
and saved on its own, and a page that fails the check costs only that page.
The same batch now takes about seven minutes and under half a million tokens,
where it used to cost 1.4 to 2.9 million.

## Old map pages are cleared away

A notebook mapped by an older version kept pages the current map would not
make, such as project pages for the Wiki's own task folders, six pages for one
project, and "people" called Google. `co wiki init` now moves a page nobody has
investigated to `.state/archived/` when the current map would not make it. It
moves the page and never deletes it. On the owner's notebook that was 105
pages, and each one was checked by hand.

## A night that can keep up

- A day now allows 30 model calls, up from 6. A call used to read the whole
  notebook; now a call is one page, so 30 calls cost less in total than the
  old three batches did.
- The one page the nightly round investigates can use at most 8 of those
  calls.
- Once the day's calls are spent, the schedule stops for the day. It no longer
  logs the same error every five minutes until midnight.
- A page is no longer refused because the model rewrote a line the runner owns,
  or re-cited the page's own sources in new words.

## Install

```sh
python -m pip install --upgrade --pre 'connectonion==1.8.9b14'
co wiki config set limits.runner_calls_per_day 30   # a notebook made before this keeps its old cap (#1714)
co wiki init                                         # archives the stale pages
```

## Known limits

- The nightly round still rarely investigates a large page (#1723).
- Investigating a large subject is still expensive: your own page over 30 days
  measured 16 million input tokens, 89% of them cached.
