Skip to content

fix(status): green the agent validator, fix door freshness, unblock root pytest - #25

Merged
zkAurora merged 0 commit into
mainfrom
chore/reconcile-live-box
Aug 31, 2026
Merged

fix(status): green the agent validator, fix door freshness, unblock root pytest#25
zkAurora merged 0 commit into
mainfrom
chore/reconcile-live-box

Conversation

@zkAurora

Copy link
Copy Markdown
Contributor

What

Two items carried over from the session handoff, plus adjacent fixes found while doing them.

Validate Agents CI — was red

agents/default.character.json was the only character file without a top-level id (it uses entity), and scripts/validate_agents.js rejects that. Added "id": "default" — matches the filename and the agent_registry alias key. Inert at runtime: the loader only reads name / tools / system_prompt via .get().

Doors — swarm:door:* populate correctly

  • Freshness tiebreak bug. The newest-assertion-wins comparison used (door["age_s"] or 10**9). A door asserted under half a second ago has age_s == 0, which or turns into 10**9, so the freshest assertion sorted as the oldest and a stale aliased assertion would win. Extracted door_age() and fixed both swarm_heartbeat.read_doors_async and apps/status's _observe.
  • apps/runtime._redis_write_doors now calls the shared write_door_async instead of re-inlining build_door_payload + r.set (same 600s TTL) — per the repo's "shared code lives in packages/" rule.
  • New packages/swarm-core/tests/test_doors.py (12 tests) — doors had no coverage. FakeRedis gains scan_iter to support it.

pytest from the repo root was broken

Run from the root, pytest took the root as rootdir and never read packages/swarm-core/pyproject.toml, so asyncio_mode was lost and every async test errored with "async def not natively supported" (50 failures). Added [tool.pytest.ini_options] to the root pyproject.toml. 122 pass from the root now.

Note on history

This branch also rewrites the message of one earlier commit (chore(security): untrack the handoff log…) that spelled out internal infrastructure detail in prose. The tree is byte-identical; only the message changed. That commit is currently on main as 45c065b — see review thread; a normal merge will not remove it from main's history.

Verification

Check Result
node scripts/validate_agents.js all 37 files OK
pytest (repo root) 122 passed
each test file in isolation pass
CI import-every-module / apps-compile / layout-invariants pass locally

🤖 Generated with Claude Code

@zkAurora
zkAurora merged commit f0b0686 into main Aug 31, 2026
3 of 4 checks passed
@railway-app
railway-app Bot temporarily deployed to distinguished-wonder / production August 31, 2026 01:32 Inactive
@zkAurora
zkAurora deleted the chore/reconcile-live-box branch August 31, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant