Repository navigation
·
333 commits
to develop
since this release
[0.32.0] - 2026-11-28
Summary. 0.32.0 has two themes. The first is that athenaeum no longer
guesses which fields are private: only fields a storage.routes rule names are
kept off the page, and the two older field tables are removed. The second is
safer unattended runs: API spending now has default dollar limits, the nightly
athenaeum run waits for a busy run lock instead of exiting, and a refused lock
names its holder. It is a MINOR release because it removes configuration keys
and built-in defaults, adds a flag and a status field, and carries two breaking
changes. athenaeum.__all__ is unchanged.
For most users:
- Breaking changes: two entries are marked
**BREAKING:**, and each has a step
below. (1) The built-in private-field lists (emails,phones,
former_emails,alt_emailsfor thepiiclass, and every field for any
other class mapped outside the corpus) are gone; an install that relied on
them has undeclared vault data, andathenaeum runand the contact writers
refuse to start until astorage.routesrule names the fields. (2)
storage.excluded_fieldsandstorage.excluded_read_mappingare removed and
refused at first use. - Behaviour changes: API spending is limited to 10 US dollars per run and 20
US dollars per day unless you setspend.max_usd_per_runor
spend.max_usd_per_day. A realathenaeum runwaits up to 3600 seconds for a
live holder of the run lock (--wait 0restores fail-fast).athenaeum disable --compilenow also stopsingest,drainand the other model-calling
commands, and the two model-client builders take a requiredaspect
argument. The corrections ledger names records by ordinal, so a script reading
the old keys needs the new ones. - Security-relevant: a correction value rejected for an unlisted field is no
longer written in plain text to the committed corrections ledger or the handoff
note (see### Security).
Upgrading from 0.31.0
pip install -U athenaeum(oruv tool upgrade athenaeum), then
athenaeum doctor.- If
athenaeum.yamlmaps any class to a location outside the corpus (for
examplepii: excluded), runathenaeum storage status --suggest-routesand
copy the printedstorage.routesentries intoathenaeum.yaml. They
reproduce the previous behaviour exactly. Then deletestorage.excluded_fields
andstorage.excluded_read_mappingif you set them. An install with no
location outside the corpus in use needs neither step. - If a run may spend more than 10 dollars, or a day more than 20, set
spend.max_usd_per_runorspend.max_usd_per_dayinathenaeum.yaml. Set a
key tonull(or the environment variable tonone) to turn a limit off. A
first large import may need a higher limit. - If a scheduler step runs
athenaeum runwith its own timeout, make that
timeout longer than 3600 seconds, or pass--waitexplicitly. - The old read-flag names (
with_pii,include_excluded,--with-pii,
--include-excluded,--excluded-fields) and theathenaeum retire-pages
alias still work in this release and print a notice. The 0.31.0 notes said
they would go in the next minor release; they did not, so keep renaming
(include_sensitive,--sensitive-reads,athenaeum retire). - If you run
athenaeum disable --compileorATHENAEUM_DISABLED=compile,
note thatingest,drainand the other model-calling commands now stop
too. Code that builds a model client outside the CLI must passaspect.
Removed
- BREAKING: athenaeum no longer assumes which fields are private (athenaeum#3170). A class mapped to a location outside the corpus used to get a field list nobody wrote:
emails,phones,former_emailsandalt_emailsfor thepiiclass, and every field on the record for any other class. Both defaults are gone: only fields astorage.routesrule names are kept off the page. An installation whosestorage.mappingsends a class to such a location with no rule naming it now has undeclared vault data.athenaeum run, correction processing, the contact writers (repairof contact records and bounce marks,attribution place),correct-notes,ingest-answers, andstorage migrate-pii --apply/storage move-type --applyrefuse to start and write nothing. A read that asks for sensitive values raisesUndeclaredVaultDataErrorinstead of reporting the fields as absent. Ordinary recall,athenaeum doctorandathenaeum storage statuskeep running and report the condition. No record is moved, rewritten or deleted, and athenaeum never editsathenaeum.yaml. The inline-contact lint now warns about a frontmatter field only when a rule routes it off the page and the page still carries a value. Upgrade step: runathenaeum storage status --suggest-routesand add the printedstorage.routesentries toathenaeum.yaml; they reproduce the previous behaviour exactly. For the usualpii: excludedmapping that is- page_type: person,fields: [emails, phones, former_emails, alt_emails],to: [excluded]. Delete a field from the printed rule to keep it on the page from now on (values already stored stay in the location and the status command lists them), or move it to its own rule withto: []to stop storing it. The same command lists each location, field name and record count no rule covers, with no values. An installation with no location outside the corpus in use is unaffected. - BREAKING:
storage.excluded_fieldsandstorage.excluded_read_mappingare removed (athenaeum#3173). Astorage.routesrule names its page type and its fields directly, so the two tables and the surface-class indirection between them said nothing a route does not. The config resolvers for them and the built-inpersontopiiread mapping are deleted;storage.route_forreadsstorage.routesandstorage.mappingonly. A configuration that still sets either key is refused by the first command that reads or writes a routed field, with thestorage.routesentries that reproduce what the keys did (the same entries a configuration without the keys gets fromathenaeum storage status --suggest-routes);athenaeum doctorand the config-load log list the keys as removed. An empty value is not a setting. No file moves: a record written under the old keys stays where it is and is read through the route that names its location.storage.mappingis unchanged and stays the short form of a whole-page-type route. Upgrade step: start any command that reads or writes a routed field, such asathenaeum run, copy the printedstorage.routesentries intoathenaeum.yaml(merge them with anyroutes:list you already have), then deletestorage.excluded_fieldsandstorage.excluded_read_mapping. For the usualpii: excludedmapping with the contact fields that is- page_type: person,fields: [emails, phones, former_emails, alt_emails],to: [excluded]. A page type that was its own class (storage.mapping.<type>plus a field list) gets a whole-page rule that replaces the mapping entry. A location that holds fields must be markedsensitive: true. A correction run that still sets the removedlibrarian.corrections.sensitive_fieldskey now printsstorage.routesentries as its replacement.
Changed
athenaeum disable --compile(andATHENAEUM_DISABLED=compile) now also stopsingest(including--if-triggered),drain,dedupe wiki-pages,recompile planandrecompile apply,audit,description backfillanddecisions recompare(athenaeum#3374). Before, onlyrunandsession-endhonoured it, so a scheduledingest --if-triggeredkept calling the model while compilation was supposedly off. Each now exits 0 with the same one-line JSONnoopsummaryrunprints and builds no model client; per-turn recall keeps its client. The two model-client builders,build_llm_clientandbuild_decision_client, take a requiredaspectargument (compileorrecall) and raiseathenaeum.killswitch.DisabledErrorwhen it is disabled; a caller that builds a client outside the CLI must now pass it.- Tier map (athenaeum#3325): 102 modules re-placed by their job rather than their imports,
tier_exceptions.txtregenerated (58 to 34 entries),from athenaeum import <name>of a non-submodule is now reported,chromadb/onnxruntimeare tracked withsearchas their only home, and storage-importer and stale-exception cases are report-only until athenaeum#3225. - Behaviour change: API spending now has default limits of 10 US dollars per run and 20 US dollars per day (athenaeum#3372). Before, every dollar limit was unset unless you set it, so a default install was bounded only by the call-count cap. The defaults apply when
spend.max_usd_per_runandspend.max_usd_per_dayare absent fromathenaeum.yaml, including on an install that never set them, so a run that would spend more than 10 dollars now stops, and the message says how much was spent and names the key and environment variable to raise (and, when the limit came from the environment variable, says that variable overrides the yaml key; a window stopped by the drain's own budget says so). An install that setsATHENAEUM_SPEND_MAX_USD_PER_RUNorATHENAEUM_SPEND_MAX_USD_PER_DAYto zero, a negative number or a malformed value, and has no yaml key, previously had no dollar limit for that setting and now gets the default; that spelling is read as unset, not as "no limit". Non-finite values (inf,1e999,.inf) are malformed, not "no limit". The per-day default applies only while the spend ledger is on (spend.ledger_enabled, on by default), because a per-day total needs it; with the ledger off it is skipped, and bothathenaeum doctorand the run-time notice say so. Every run that applies a default logs one line naming the limits (once per process, so once on each such run, not only on the first run ever). To change a limit, set the key inathenaeum.yaml; to turn one off, set it tonullthere, or set the environment variable to the wordnoneornull(case-insensitive). A value you already set keeps its meaning, including zero or below in the environment (read as unset) and zero, negative or non-numeric in the file (no limit). The limits govern every command that checks the spend ceiling, not only the nightly run:athenaeum run,audit, each window ofathenaeum drain, the backfill, page-description and subject-population commands, and the nightly audit drain's share of the daily limit.athenaeum drain --max-usdis also held to the per-day limit: the drain now warns before it starts when--max-usdis above it, and a drain stopped by it says so. Thelibrarian-run-degradedmarker line now ends inspend=$<spent today>/$20.00on every metered-API run that has no per-day limit of its own, where it used to omit the figure.athenaeum doctorandathenaeum statusshow the limits in force and whether each is a default (with a note, when the global provider is not metered per call, that the limits still apply to per-step overrides to the metered API and todrain), and the config fileathenaeum initwrites carries both keys with these values. A first large import may need a higher limit. - Default change: a real
athenaeum run(not--dry-run) now waits up to 3600 seconds for a live holder of the run lock instead of failing at once (athenaeum#3362). Before, a scheduled nightlyrunthat started while another athenaeum process held.athenaeum.lockexited without compiling anything.--wait SECONDS,ATHENAEUM_LOCK_TIMEOUTandlibrarian.lock_timeoutstill override the default, and--wait 0(or a0in the env var or yaml) restores fail-fast. Every other command keeps its fail-fast default. The wait never breaks a holder whose heartbeat is fresh; the existing stale-heartbeat break (librarian.lock_break_stale_after) is unchanged. The wait happens before--max-runtimestarts counting, so a scheduler step's own timeout must exceed it, or the caller should pass--waitexplicitly. Arunstill blocked at the end of the wait exits 75, and while it waits it logs one warning naming the holder, then a progress line every 5 minutes. - The one-line JSON summary of
athenaeum ingestgainsphase_durations: for each librarian phase the compile reached,wall_sandcpu_s(process-wide CPU seconds, so a multi-core phase shows a CPU figure above its wall figure), in run order. It is present on a run stopped early by its deadline (with the phases reached so far) and absent when no compile ran (a no-op or a--dry-runpreview) and on--rawtargeted ingests, so those lines are unchanged. Each phase also logsphase <name> done: wall=..s cpu=..swhen it ends (athenaeum#3399). - The corrections ledger (
wiki/_corrections_applied.jsonl) names a record by its ordinal in the batch instead of bycorrection_id, because that id is a digest of the target, field and value. A new line carriesnon_trivial_refsandraised_tier_refs(lists of ordinals) andwithheld(a list of{ref, stored},storedbeingvaultornowhere) in place ofnon_trivial_correction_ids,raised_tier_correction_idsandredacted_correction_payloads; a script reading the old keys needs the new ones. The handoff note's per-record line startsref=<batch_id>#<ordinal>instead ofcorrection_id=<id>. A batch whose earlier ledger line uses the old keys is still recognised as already handed off, so no duplicate note is written after upgrading. - Docs: the README quick start now runs
athenaeum decisions list(the bare command exits with a usage error), says compilation runs nightly onceathenaeum schedule installhas been run, and no longer claims the agent has only two tools (athenaeum#3386). A new test checks everyathenaeum ...command in the README against the real parser. - Docs: new team deployment scenarios page describing a small company on one served deployment and independent people sharing one project, so a design for access, identity or federation has a deployment to be checked against. The use cases (§3, with §3.2 rewritten so that policy precedence is the deployment's to configure, and new use cases for policy layering, cross-store contradictions and source marking) and the north star (new §2.13 on where access is enforced and how an unverified source is recorded, and three additions to §3) are amended to match (athenaeum#3276).
- Docs:
scripts/backfill_github_releases.pycreates the GitHub Releases that tags cut beforerelease.yml's release job lack (athenaeum#3363). It prints a plan by default,--applycreates them, a tag that already has a Release is skipped, and bodies come fromCHANGELOG.md, thenCHANGELOG-archive.md, then the annotated tag message.release.ymlis unchanged. - Docs: every relative link and anchor in the tracked Markdown files now resolves (athenaeum#3389). Fourteen links into the generated configuration reference, two wrong paths and a missing section in the adapter contract, and three links in the changelog archive were repointed. New
scripts/check_doc_links.pychecks them with GitHub's heading-to-anchor rule, and CI runs it. - Docs: new design note
docs/design/access.mddescribes the access model the access epic builds (principals, the nine rights and five acts, the identity and authorship proof enums, the policy file, conditions, the engine-written source label, approvals on local channels, separately held stores, cross-store contradictions and migration), with each section marked shipped or planned;docs/design/security-posture.mdanddocs/design/federation-store-access.mdnow point to it and mark the claims it supersedes (athenaeum#3283). - Docs: the CLI reference's
athenaeum retire-pagesentry, in the command index and its own section, now opens with "Deprecated alias ofathenaeum retire, removed in the next release" and links to that command instead of repeating its full description; a backticked command name in command help now renders as a link to that command's section (athenaeum#3212). - Docs: the security posture page now says the per-turn recall hook sends the previous user message and the end of the assistant's last reply (each capped at 1,500 characters, read from the session transcript) to the topic extractor model, that this is on by default, and that
ATHENAEUM_PUSH_CONTEXT_CARRYOVER=0turns it off (athenaeum#3213). - Docs: the configuration reference's "Other environment variables" table now lists
ATHENAEUM_SERVE_SENSITIVE_READSnext to its deprecated aliasATHENAEUM_SERVE_EXCLUDED_FIELDS; the generator used to list only the alias because the first variable a resolver reads gets its own section (athenaeum#3211). - Docs:
CONTRIBUTING.mdnow describes versioning as it works (athenaeum#3390). The version number changes when a release is cut, there is no per-merge bump, and the one statement of what makes a release MINOR is inCONTRIBUTING.md;AGENTS.mdand the stability guide link to it. The dependency-pin advice is the stability guide's exact version, and the sentences about a deployment directory and tool are gone. This section's headings now follow the order the changelog states.
Added
athenaeum status --jsonnow carries the API dollar limits as fields (athenaeum#3407):spend_limit_fields.per_runandspend_limit_fields.per_day, each withamount(dollars,nullfor no limit),source(environment,config,default,noneorskipped) andis_default. The display lines inspend_limitsare unchanged.athenaeum ingest --raw PATH|GLOB ...compiles only the named raw files on demand (athenaeum#3223). Paths and globs resolve against the raw root (a path outside it is refused with a non-zero exit), the flag can repeat, and every named file gets an outcome in the output (created, updated, retained with a reason, dropped, failed, deferred, held,not-foundornot-entity-intake). Any other pending raw file is left untouched and unstamped, and the corpus-wide phases (wiki-dedupe, name-collision, qualified-name, the auto-memory block, page recompile and the other late phases) are skipped; the raw-screen hold, run preconditions, budget and spend-ceiling checks, run deadline and finalize still run, and batch mode is forced off. After a real write it refreshes the search index (athenaeum recallfinds the page straight away), sharing one helper withathenaeum run. With--dry-runit runs the compile in no-write mode and reports the same outcomes (a file that needs an LLM tier reportswould-reach-tier2-3) with nothing written to disk.- Docs: tests now pin both values of
librarian.scope_aware_recall_enabled(athenaeum#3396): with it off a recall that passes a scope matches one that does not, with it on pages outside the scope drop and a general page yields to a more specific one, and an unknown scope keeps only unscoped pages. No behaviour change. - Docs: the test suite now zeroes the per-vault page counts and per-rule discard counts before and after every test (athenaeum#3404), so a test that reaches a later phase directly no longer inherits an earlier test's counts. Tests only; no behaviour change.
- Docs: tests that copy a git working tree now go through one shared helper that skips transient
*.lockfiles under.git, and their temporary repositories turn off git's background maintenance and auto-gc (athenaeum#3405), removing an intermittent CI failure intest_3178_raw_screen_hold. Tests only; no behaviour change.
Fixed
- A spending limit with a value that is not a number no longer passes
athenaeum doctoras ok (athenaeum#3407).spend.max_usd_per_run: 1O(letter O), zero, a negative number or a boolean resolved to no limit and was reported as "no limit (set explicitly)";doctornow warns, naming the key and the value.nulland the wordsnone/nullstill mean no limit. - The deferred-work manifest written when a spending ceiling stops a run now names the real config keys,
spend.max_usd_per_run,spend.max_usd_per_day,spend.max_tokens_per_runandspend.max_tokens_per_day(athenaeum#3407), instead oflibrarian.spend_max_usd_per_*, which do not exist. athenaeum drainnow names the per-day dollar limit when a window stops because outstanding batch reservations pushed today's total to the limit (athenaeum#3407). The stop note counted billed spend only, so that stop fell back to the generic hint.athenaeum ingest --if-triggeredno longer retries on every tick once a per-day spending limit has been reached (athenaeum#3406). Before, a fired trigger still took the run lock, ran every phase, deferred every file and exited 3 with an ERROR line, on each scheduled tick until the accounting day rolled over. Now, when a trigger fired but today's spend already meets a per-day limit, the tick exits 0 without taking the lock or calling a model, and its JSON summary carries"trigger": "per-day-spend-limit"and aspend_limitfield naming the limit. The first such tick in an accounting day logs one WARNING; later ticks that day log at INFO. The next accounting day runs normally.- A refused run lock now names what holds it (athenaeum#3362). The lock record gains a
command:line and alabel:line (the latter only whenATHENAEUM_RUN_TYPEis set), and the refusal message prints both next to the PID. The command line records exactly three things: the program's basename, the first token that is a registered athenaeum top-level command (soathenaeum --verbose run --wait 5recordsrun), and flag names matched by pattern. From a dash-leading token only a long flag name (--[A-Za-z][A-Za-z0-9-]*, so--token:abcgives--token) or one letter after a single dash (-pS3cretgives-p) is kept; a token that does not start with a valid flag name (-5,-----BEGIN) records nothing, and a bare--stops the scan. A token after a flag is judged the same way, so--name --secretrecords two flag names. It never records a flag value, a positional argument or any other word, sopython /path/script.py /path/kb tokenrecords justpython. Control, line-separator, bidi and zero-width characters are replaced by a space and the line is cut to 120 characters. Building the record never raises: a non-string argument is skipped, and an argument that cannot be encoded is written with a replacement character, so it cannot leave the lock file truncated while the lock is held. A lock file written by an older version has neither line and prints as before. - Defensive exit code: a lock refusal that escapes a command handler now exits 75 (
EX_TEMPFAIL) fromathenaeum.cli.maininstead of propagating as a traceback, andathenaeum ingestlets a refused lock through its generic error handler rather than reporting it as exit 1 (athenaeum#3362). Every command that takes the lock through_acquire_or_exitalready exited 75. The code is listed indocs/reference/exit-codes.md. - The wiki-page duplicate scan no longer re-embeds pages that have not changed (athenaeum#3399). It used to chunk and embed every candidate page on every run. Each page's pooled embedding is now cached in the cache directory (
wiki-dedupe-embeddings.sqlite), keyed on a hash of exactly the embedded text plus the embedder identity and the chunking parameters, and scoped to the knowledge root so roots sharing a cache directory do not evict each other. Only new or edited pages reach the embedder; an embedder or chunking change invalidates the entries; entries for pages that no longer exist are removed; fallback-embedder vectors are never cached; a corrupt cache file is moved aside and rebuilt; and--dry-rundoes not write the cache. The effect on the run time of an incremental compile has not been measured on a real store: use the newphase_durationsto see where its time goes. enumerate_entities(the MCP tool,athenaeum enumerateandathenaeum.enumeration.enumerate_entities) now lists entity pages whosevalid_untilis in the past (athenaeum#3321). Before, such a page was left out with no flag to bring it back, and even auid:eq:<uid>predicate returned no hits. On a company or person page that date usually records when a relationship ended (a former client, a past employer), so a listing such as--where former_client:eq:truesilently dropped exactly the ended relationships. The search index still leaves these pages out, sorecallis unchanged. Enumeration also reads the files the index leaves out and adds the ones excluded only for theirvalid_until. Deprecated,pii: trueand index-excluded pages are still never listed, and an expiredbucket: dailypage is listed as before. The tool description andathenaeum enumerate --helpnow say so. To list only current relationships, filter on a field.athenaeum session-endno longer attempts a full index rebuild (athenaeum#3320). When the existing index cannot be reused (an index-format change such as a metadata schema version bump, anembedding_modelchange, or a deleted index file), the rebuild re-embeds every page. On a large wiki that runs longer than the SessionEnd hook's time limit, so each attempt was killed and the next session close started it again from scratch, using CPU on every close while the index stayed on the old format. Session end now writesfull-rebuild-required.jsonin the cache directory, skips the reindex (recall keeps using the existing index), reportsfull_rebuild_requiredin its JSON summary and exits. The nightlyathenaeum runandathenaeum reindexperform the rebuild, record each attempt in the marker, and delete it when the rebuild completes; later session ends are incremental again. A newathenaeum doctorcheck,index_rebuild, warns while a rebuild is pending and says when three attempts in a row have failed or been killed. A first build with no index yet, andsession-end --full, still build at session end.read_entitiesandread_entitywithsurface_class="pii"returned an emptycontact(and no redaction markers) for a routes-only configuration, such asstorage.mapping: {pii: excluded}plus apersonfield rule toexcluded(athenaeum#3224). Root cause: athenaeum#3170 removed the built-inpiifield list and athenaeum#3173 removed thepersontopiiread mapping, soresolve_excluded_fieldsfound no fields underpiiwhile the route's fields were filed under a derived class. A class named instorage.mappingnow reads the fields thatstorage.routessends to the location it maps to. Unreleased only; v0.31.0 was not affected.athenaeum runno longer refuses a store declared with no history (athenaeum init --no-history,storage.history: none). It now decides from the store's declared history instead of looking for a.gitdirectory: on such a store the run proceeds and logs once that no pre-run snapshot is available for raw-file recovery. A store that declares git history but has no.gitis still refused with the same message (athenaeum#3219).list_pending_decisions(include_sensitive=True)on a network server now applies the per-vault read grant thatrecallandread_entityapply, in the same order: theserve.sensitive_readsceiling, then the owner condition, then the grant. A field-correction question whose value is kept in a vault the caller holds no read grant on shows the same redaction marker as a listing withoutinclude_sensitive, and the item is still listed. Before, any owner caller of a served process received the value. Each vault asked about is written to the sensitive-read audit log under the tool namelist_pending_decisions. Values are now resolved only for the items on the returned page. A stdio server and the command line are unchanged (athenaeum#3220).
Security
- A correction value rejected because its field is not on the allowed-fields list (
librarian.corrections.fields) is no longer written to the corrections ledger or the handoff note (athenaeum#1419). Before, the ledger line inwiki/_corrections_applied.jsonlcarried the value in plain text underredacted_correction_payloads, that file is committed and synced with the wiki, and the handoff note named the target even when it was an address-like handle. Now the value is stored in the target entity's vault record (sectionwithheld_corrections) when the deployment has a vault configured for that entity, under the reference<batch_id>#<ordinal>that the note and the ledger line (withheld) name; when no vault is configured the value is not recorded anywhere and the note says so. The note shows the target only as an entity uid or a name, and a handle is shown astarget withheld. Ledger lines written by earlier versions are not rewritten: to check a ledger, search_corrections_applied.jsonlfor the keyredacted_correction_payloadsand for any entry in it whosevalueis set. New lines no longer carry that key.