Skip to content

v5.0.0: mainline v5 — tests, CI, tournament, regime audit#4

Merged
LeoLin990405 merged 1 commit intomainfrom
chore/v5-mainline
Apr 14, 2026
Merged

v5.0.0: mainline v5 — tests, CI, tournament, regime audit#4
LeoLin990405 merged 1 commit intomainfrom
chore/v5-mainline

Conversation

@LeoLin990405
Copy link
Copy Markdown
Owner

Follow-up to #3. Iterates the entire repo around v5:

A. v5 Mainline

  • README leads with v5 + tournament example (Chinese + English)
  • CHANGELOG v5.0.0 entry with new capabilities and limitations
  • package.json created (name=civagent, version=5.0.0, bin, scripts, ESM)
  • CLI help reflects v5

B. Infrastructure

  • 9 unit tests (node:test): path-traversal guard, mtime re-seed, ANSI/JSONL cleaning, injection guard — all passing
  • regime-validator.mjs: mechanical check across all 57 regimes, also used by npm run validate:regimes
  • GitHub Actions CI (.github/workflows/ci.yml): syntax + tests + regime validation on every PR

C. 57 Regime Audit

  • 100% pass mechanical validation
  • 40 regimes use non-canonical orchestrationPattern aliases (e.g. centralized-hierarchy instead of centralized)
  • Added PATTERN_ALIASES normalizer in engine/regime-to-cc.mjs so the engine actually resolves engine/modes/<canonical>.md for alias regimes (this was a latent v4 bug)
  • regimes/AUDIT.md documents the state + design limitations

D. Tournament Mode

  • civagent tournament --civs a,b,c,d "task" — parallel N-civ match
  • engine/v5/tournament.mjs spawns isolated civ runs, collects transcripts, gemini judges with ranking table
  • Writes ~/.civagent/tournaments/<id>/result.md

Test plan

  • npm run lint:syntax — green
  • npm test — 9/9 passing
  • npm run validate:regimes — 0 errors, 40 style warnings
  • bin/civagent tournament — usage gate works
  • Deferred: live tournament run requires tester with CC auth in isolated HOMEs (one-time per civ)

Risks

  • CI doesn't run live Claude/Gemini/Codex calls (those need secrets + are flaky for mainland CI runners). Validates structure only.
  • Tournament judge uses gemini; degrades gracefully if unavailable.

A. v5 is now the mainline
- README leads with v5 learning-loop pitch and tournament example
- CHANGELOG v5.0.0 entry
- package.json (new) declares name=civagent, version=5.0.0, bin, scripts
- bin/civagent help text updated for v5

B. Infrastructure
- test/civ-memory.test.mjs — validateRegime traversal, envDirFor, mtime re-seed
- test/skill-sediment.test.mjs — cleanTranscript ANSI/JSONL, injection guard
- test/regime-validator.mjs — mechanical validation of all 57 regimes,
  with alias→canonical pattern map (centralized-hierarchy → centralized etc.)
- .github/workflows/ci.yml — syntax, tests, regime validation on every PR

C. 57 regime audit
- regimes/AUDIT.md — reports 40 regimes using alias orchestration patterns,
  all now normalized at runtime via engine/regime-to-cc.mjs PATTERN_ALIASES
- Documents known design limitations (compression, no time dimension)

D. Tournament mode
- engine/v5/tournament.mjs — parallel N-civ match + gemini judge ranking
- bin/civagent tournament --civs a,b,c,d "task"
- Writes ~/.civagent/tournaments/<id>/result.md

Test evidence: 9/9 unit tests pass, lint:syntax green, validate:regimes
reports 0 errors + 40 style warnings.
@LeoLin990405 LeoLin990405 merged commit 8072268 into main Apr 14, 2026
1 check passed
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