Skip to content

fix(cli): write the registered algorithm name from init --algorithm aliases - #895

Merged
Birfy merged 1 commit into
mainfrom
fix/894-init-algorithm-canonical-name
Nov 8, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix/894-init-algorithm-canonical-name

Conversation

@Birfy

@Birfy Birfy commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Closes #894

init --algorithm GEPA / archive-selection passed validation through the folding registry lookup but algorithm_override returned the typed alias, so the spec carried "GEPA" / "archive-selection". It now returns alg.name, matching algorithms list and algorithms run (#696).

  • agentdescent/cli.py: algorithm_override returns the registered name (bare and {name, params} forms).
  • tests/test_algorithms.py: alias cases for text (bare and with --param) and skill_dir.
  • changelog.d/894-init-algorithm-canonical-name.md.

Tests: pytest tests/test_algorithms.py tests/test_cli_*.py tests/test_mcp_algorithm_spec.py pass locally.

@Birfy

Birfy commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS
Tip SHA: e31f944
Ran: pytest -q tests/test_algorithms.py tests/test_cli_*.py tests/test_mcp_algorithm_spec.py at the tip → passed. risk_gate.py from main → T2 (32 changed lines / 3 files).
Not run: full suite (CI covers 3.9–3.13).

Correctness. algorithm_override already resolves the name through algorithms.get (case and -/_ folding, #696) but returned the typed alias; returning alg.name makes init --algorithm GEPA / archive-selection write gepa / archive_selection, in both the bare and {name, params} forms. The other caller, plan/evolve --algorithm (_apply_algorithm_flag), only overrides the in-memory spec, so a canonical name there is strictly better; unknown names still raise before this line.

Tests / docs. New test_init_writes_the_registered_name_for_an_alias covers text bare, text with --param, and skill_dir; changelog fragment 894-init-algorithm-canonical-name.md.

Risk. T2 (CLI only). AGENT_PAUSE=false; will squash-merge when required CI is green.

@Birfy
Birfy enabled auto-merge (squash) November 8, 2026 18:12
@github-actions github-actions Bot added the risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff label Nov 8, 2026
@Birfy
Birfy merged commit b2e9d06 into main Nov 8, 2026
9 checks passed
@Birfy
Birfy deleted the fix/894-init-algorithm-canonical-name branch November 8, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

init: --algorithm alias (GEPA, archive-selection) is written verbatim into the spec

1 participant