Upgrading¶
Notes for moving between releases. Each entry lists only user-affecting changes.
0.2.x to 0.3.0¶
- Study runner is a package CLI. Use
silisocs-study(orpython -m silisocs.studies.run_study). The legacy study script shims and aliases were removed. - Scenarios resolve by name. The scenario library is bundled and addressed by
name, for example
--config-path election. Example scenarios are no longer shipped in the installed wheel; reference a bundled scenario by name or pass an explicit path. - Class paths are validated at startup. An invalid
class_pathnow fails fast during construction instead of part-way through a run. num_agentsis a declared total, not a cap. When a class needs more agents than it has personas, the persona records recycle with numbered suffixes, and a mismatch between the built agent count andnum_agentslogs a warning.- Checkpoint restore is atomic and checkpoint-owned. Restore validates then applies state (see ADR 0003). Multi-GM runs keep per-GM logs and support per-GM restore overrides; the Mastodon backend self-restores from its embedded action history.
- Auto-resume is on by default. A run now resumes from its own output
directory when that directory already contains checkpoints, unless you set an
explicit
sim.checkpoint.source_run. A fresh output directory (the usual case) still starts from scratch. Setsim.checkpoint.auto_resume: falseto force a fresh start into a directory that already has checkpoints. - More built-in LLM providers. Common providers are available as named presets
(
anthropic,gemini,openrouter,groq,together,deepseek,mistral,fireworks,xai,ollama). Setsim.llm.providerto the name; see Configuration. Existingopenai/openai_compatibleconfigs are unchanged.
0.3.0 to 0.4.0¶
Visual layer¶
- Studio replaces the Streamlit and Dash apps (BREAKING).
silisocs.dashboardandsilisocs.evaluations.analysis.dashboardare gone, along with thedashboardandvizextras. Installsilisocs[studio]and runsilisocs-studio(localhost by default; binding wider requiresSTUDIO_AUTH_TOKEN). Studio covers what the two apps did — scenario browsing, launch, run inspection, analysis — plus study drill-down, live run control, and the platform viewers, which previously needed the separatevizextra. See Studio.silisocs-reportrenders a run's analysis panels to a standalone file. There is no shim:pip install silisocs[dashboard]andpip install silisocs[viz]both fail on this release.
Engine and scheduling¶
- Engine preset classes retired (BREAKING for
sim.engine.class_pathonly).BaseRuntimeEngine,FlowRuntimeEngine,MultiGMRuntimeEngine, and thesilisocs.simulation_engines.multi_gmmodule were removed, andBaseRuntimeEngineis no longer re-exported from thesilisocsnamespace. All three were preset wrappers with no behavior of their own: each constructor only chose a default step strategy. That choice is nowsim.engine.step.built_in(base,sequential,flow,multi_gm,multi_gm_serial,multi_gm_staged). Engine subclassing is unchanged —RuntimeEngineis still exported fromsilisocs, still subclassable, andsim.engine.class_pathstill builds it with the full strategy set injected. To migrate, dropsim.engine.class_pathand setsim.engine.step.built_in; a stale path raises aValueErrornaming the replacement. A subclass that overrodestep_strategy_classbecomes asim.engine.step.class_pathinstead — that seam now receivesflow_chainsandseeddirectly rather than reading them off the game master. multi_gmnow traverses flow chains concurrently (BREAKING). On 0.3.0,sim.engine.step.built_in: multi_gmran flows row-major: each flow completed its whole GM chain before the next flow started. It now runs flows as independent pipelines that serialize only where they share a GM, withflow_orderflows as a serial prefix. Throughput improves; per-step action ordering across flows no longer matches 0.3.0, so a run reproduced from an old seed can differ. Setsim.engine.step.built_in: multi_gm_serialfor the previous traversal, ormulti_gm_stagedfor a global per-stage barrier.- Activity models moved to the sim layer (BREAKING). The config-derived
participation models (
activity_probability,activity_markov) moved out of the GM'senv.gm.components.next_actingslot tosim.engine.participation. A config that names them undernext_actingraises a build-time migration error. Setsim.engine.participation.built_in: <model>with the sameparams(minusagent_names), and leavenext_actingon an environment-derived built-in (all_agentsorfixed_order). Effective acting each step is participation ∩next_acting. TheActivityProbabilityNextActingandActivityMarkovNextActingclasses no longer exist; the equivalents are insilisocs.simulation_engines.policies.participation. - The bundled social env presets no longer gate participation (BREAKING, and
silent).
env/twitter_like.yaml,env/reddit_like.yaml, andenv/mastodon.yamlshippednext_acting: activity_probabilitywithuser: {inactive_to_active: 0.3, active_to_inactive: 0.3}, so a bareenv=preset run activated roughly a third of the population each step. Those presets now usenext_acting: all_agents, andsim.engine.participationdefaults toall, so every agent acts every step — more LLM calls per step and different results, with no error to tell you. The default moved because the non-social presets (resource_market,virtual_space,messaging, the game backends) have nouserrole and were silently falling through to random participation. Every bundled scenario was migrated and keeps its previous behavior; a scenario of your own that relied on theenv=preset default did not. To restore it, add to your scenario'ssim.yaml:
sim:
engine:
participation:
built_in: activity_probability
params:
active_probability: null
min_active_agents: 1
activity_transition_rates:
user:
inactive_to_active: 0.3
active_to_inactive: 0.3
- Unmatched activity rates fail the run (BREAKING for misconfigured runs).
Under
activity_probability/activity_markov, every agent must match anactivity_transition_ratesentry (by agent name or sim role) declaringinactive_to_activeoractive_to_inactive. An agent matching none used to fall back to a 0.3 activation probability with a one-time warning; it now raises at the first step, naming the unmatched agents and roles. Add the missing rates, setactive_probabilityfor one global rate (activity_probabilityonly), or usesim.engine.participation.built_in: all. Runs whose rates already covered their roles — including every bundled scenario — are unaffected.
Backends and run artifacts¶
action_events.jsonlrecords committed actions only (BREAKING for downstream analysis). The log was every invoked action; it is now the canonical log of actions that committed a state change or performed a deliberate logged read. A rejected, failed, or idempotent call — an agent liking a post twice, replying to a post id that does not exist — no longer produces a row. Action counts computed from an old log are therefore not comparable to a new one. Backend authors returnActionResult(message, committed=False)to mark a call uncommitted; plain returns still log automatically. Every committed row also appends to an in-memory mirror queryable at runtime viacount_committed_events(...)/iter_committed_events(...). See Backends.event_to_replay_actionmoved off backends into a registry (BREAKING for custom backends). Backends no longer carry a replay method; they implement onlyget_state/set_state. Event-to-action replay now belongs to thesocial_action_event_replayrestore strategy, which looks up a mapper bybackend_typeinruntime/checkpointing/replay_mappers.py. A custom backend that implementedevent_to_replay_actionshould callregister_replay_mapper(backend_type, mapper)at import time with the same logic as a module-level function, or setprovides_checkpoint_state = Trueand self-restore fromget_state/set_state. A restore that a stateless mapper cannot express is a customsim.checkpoint.restore.class_pathstrategy.- The
current_useractor-argument alias is gone.agent_nameis the only runtime-injected actor parameter, and the anti-impersonation guard now covers exactly that name. A backend action that declaredcurrent_usernever received injection anyway; an agent that supplies it now gets the ordinaryUnexpected argument(s): current_userrejection.
Health and telemetry¶
- Routing fallbacks are counted. A branch router that falls back (an unusable
answer or a raised routing call under
on_invalid: random|first) increments the newrouting_fallbacksrun-health counter, alongsideharness_tool_failures, which now also reaches run health and the manifest. effective_config.yamlis redacted. Both copies are written with every non-emptyapi_keymasked as**redacted**, so a run directory is shareable even when a key was set in config rather than the environment. Nothing reads credentials back from it.
Only if you tracked main between releases¶
Both knobs below were introduced and changed within the 0.4.0 development cycle. Neither ever appeared in a release, so nothing on 0.3.0 can hit them.
sim.engine.step.params.chain_executionwas removed. The multi-GM flow-chain traversal mode is selected bysim.engine.step.built_in—multi_gm(concurrent, default),multi_gm_serial(legacy row-major), ormulti_gm_staged(column-major with a per-stage barrier). A config that still setschain_executionraises aValueErrorwith a migration hint. Map the old value to the matchingbuilt_in.- Branch routers are now plain callables.
A custom
{branch: {router: {class_path: ...}}}router is no longer aRoutersubclass. TheRouterABC,RouteContext,RouterGMView, and thereads_live_state/drives_agentcapability flags are gone. A router is now any callableroute(agents, gms, ctx) -> {agent name: chosen gm name}: it receives the flow's agent objects (callagent.act(...)directly to involve them),gms({gm name: game master}, one per choice — readgm.backenddirectly for live state), andctx(RouteInfo(flow, step, seed)).class_pathaccepts a plain function (configparamsbound as keyword arguments) or a class (built withparams). The built-inrandomandagent_choiceconfigs are unchanged. Branch routing now runs at execution time under all threemulti_gm*traversals —multi_gm_serialno longer rejects live-state/agent-driven routers. To migrate a custom router: drop the base class and flags, renameroute(self, ctx)to a callable taking(agents, gms, ctx), readgms[name].backendinstead ofctx.gm_views[name].backend, ask agents by building anActionSpecand callingagent.act(...)yourself (importmatch_choicefor the same lenient answer matching), and return a per-agent{name: gm}mapping instead of one choice.
New, opt-in, no migration required¶
Every addition below is off or absent unless configured, so an upgraded 0.3.0 config keeps its behavior.
- Scale-out execution.
sim.engine.executor: asyncioruns turns as coroutines on one event loop (sync-only agents and models keep working on helper threads);sim.engine.step.params.gm_concurrency_capsthrottles one GM below the global limit;sim.checkpoint.save.built_in: shardedwrites manifest + NDJSON shards instead of one JSON per step. - Mid-run interventions. A top-level
interventionsschedule fires participation changes, bans, component retuning, turn-policy and router swaps, and action/observation injection at step boundaries. See Configuration. - Interactive run control.
sim.engine.control(stdinorcontrol_file) gates the episode loop for play / pause / step / stop; Studio drives it on the live run view. - Self-describing runs. Every run writes
run_manifest.json(status, layout, health counters, LLM usage, artifact paths, git/version/lockfile provenance). Load runs throughsilisocs.evaluations.run_artifact.load_run/load_studyrather than rediscovering the file layout.silisocs doctorchecks an environment. - New backends and agents.
env=messaging(agent-to-agent direct messages),env=public_goodsand theSimultaneousRoundGamereferee base for simultaneous-move repeated games, and experimental harness agents that embed a real agent harness as oneAgent. - Agent memory policies.
sim.memory.built_inselectswindow(the previous behavior, still the default),retrieval, orsummarizing. - Probe targeting. Per-probe
deploymentoverrides,sample_k/sample_fractioncaps, and theatanchor (pre_step/post_step/run_end). See Probes. - Generated config reference. config_reference.md lists the default value of every packaged config key and is verified against the YAML by a test.