All three shared a shape: the symptom was invisible from the data, so every
acceptance run stayed green while the VM was failing.
daily_state still called _ensure_daily_news_reading, removed when the news
feature was retired. The VM threw AttributeError 14 times in three hours and
marked the "today's schedule" maintenance step failed, but the crash sits
after the plan is saved -- so the stored plan always looked correct. Removed
the call and added a repo-wide scan rather than a single-point assertion,
since this kind of residue is by definition somewhere you did not look.
enable_memory_companion_bridge, the master switch for the whole archive
chain, was never added to _conf_schema.json. _cfg_bool falls back to True, so
the feature worked and only its operability was missing -- nothing could have
failed. It now sits in the visible external_memory_config group, with an
assertion that _flat_get still resolves it by flat key.
A fallback plan carried today's date, and all three reuse branches key on the
date alone, so one startup timing hiccup froze a template plan into the day
and archived it as real. source="fallback" was produced and never consumed;
now a fallback can be upgraded once the provider is back, capped at three
attempts and bucketed per day.
Also fixed two test files whose classes sat after the __main__ guard (silently
dropped when run directly) and the retired-config prefix list, which only
listed the uppercase WEB_EXPLORATION_ form and missed the lowercase schema keys.
VM after restart: 0 AttributeError, 0 ERRO/Traceback, plan intact at v2/llm,
switch materialised as True. Companion suite 218 passed, joint E2E 135/135.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two defects that only showed up on the real machine, both of which left the
schedule frozen on a fallback plan with nothing in the logs to say so.
The plugin asked for a chat provider 0.8s before AstrBot finished loading
them, wrote a template fallback, and stamped it with today's date -- so the
next 24 hours never retried. Resolution now falls back through get_config()
(4.26.6's Context exposes nothing else) and validates the configured id with
get_provider_by_id, because a configured default is not a loaded instance.
When nothing is ready yet the round is skipped instead of downgraded, up to
DAILY_PLAN_PROVIDER_MAX_WAITS rounds.
Once the model recovered, the real plan still could not reach the archive:
the idempotency key is always daily_plan:<date> but the plan dict never
carried a version, so every rewrite re-sent v1 and the memory side rejected
it as version_conflict. The companion swallowed that -- outbox state is only
touched when enqueue accepts, and a same key/version enqueue does not. Plans
now carry a version watermark drawn from both daily_plan and its history, and
any ok=False archive response logs a warning regardless of outbox state.
Verified on the VM: provider wait counted once and no fallback written, plan
generated at v2 with 10 segments from the model, and the stored record
upserted from the 8-segment fallback to the same v2 content.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>