Skip to content

Commit 6ff30b2

Browse files
authored
refactor(cli): clean up compilation config and registry cursor (#1367)
1 parent f2710f4 commit 6ff30b2

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/apm_cli/commands/compile/cli.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import dataclasses
56
import sys
67
from pathlib import Path
78
from typing import TYPE_CHECKING
@@ -787,15 +788,10 @@ def _coerce_provenance_targets(value):
787788
else:
788789
# Traditional single-file compilation - keep existing logic
789790
# Perform initial compilation in dry-run to get generated body (without constitution)
790-
# TODO: Refactor to use dataclasses.replace() once CompilationConfig fields stabilise
791-
intermediate_config = CompilationConfig(
792-
output_path=config.output_path,
793-
chatmode=config.chatmode,
794-
resolve_links=config.resolve_links,
791+
intermediate_config = dataclasses.replace(
792+
config,
795793
dry_run=True, # force
796-
with_constitution=config.with_constitution,
797794
strategy="single-file",
798-
target=config.target,
799795
)
800796
intermediate_result = compiler.compile(intermediate_config)
801797

src/apm_cli/registry/client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,7 @@ def list_servers(
291291
servers = self._unwrap_server_list(data)
292292

293293
metadata = data.get("metadata", {})
294-
# Spec is camelCase ``nextCursor``; ``next_cursor`` accepted as a
295-
# transitional kindness for in-tree mock fixtures only.
296-
# TODO(v0.1): drop legacy snake_case once fixtures migrate.
297-
next_cursor = metadata.get("nextCursor") or metadata.get("next_cursor")
294+
next_cursor = metadata.get("nextCursor")
298295

299296
return servers, next_cursor
300297

0 commit comments

Comments
 (0)