Goal
Have build targets reuse the canonical route-metadata text formatter already used by other project commands, retaining a thin compatibility alias only if needed.
Background
Repository-wide duplication review against f9c18f3294873cbbcda9acc7af7f1bc6b17eed45 (2026-09-17).
The two route_metadata_fields function bodies are AST-identical: both call route_for_manifest and serialize venv, uv-manager and manifest-command-trust fields. Build targets already import route_metadata_record from project_commands for structured output, but keep a separate copy of the text-field formatter.
Verified source locations:
No matching open issue was found in the repository backlog.
This is a maintainability refactor. Similarity alone is not evidence of a production failure; any demonstrated differences are called out above.
Scope
Have build targets reuse the canonical route-metadata text formatter already used by other project commands, retaining a thin compatibility alias only if needed.
Acceptance Criteria
- Exactly one implementation formats these three metadata fields.
- Preserve field order, spelling, lowercase boolean strings and trust defaults.
- Preserve both human text and command-protocol behavior for build/test/run/demo/activation.
Validation
Run build-target and project-command engine tests with project-local/external/uv routes and both trust values. The audit independently verified exact AST body equality.
Run focused checks first, then the repository-required broader checks for the actual implementation. Preserve public command contracts and review .ai-context/ impact in the PR.
Non-Goals
No removal or redesign of the current text protocol; no changes to route selection or public command metadata.
Project Fields
- Status: Ready
- Priority: P3
- Area: Runtime
- Initiative: Contract Hardening
- Size: S
- Milestone: Unscheduled; no release commitment is implied by this audit.
Agent Assignment
Implementation-ready scoped follow-up, assigned to codeforester. Follow AGENTS.md and docs/github-workflow.md: start through basectl gh issue start, use the canonical issue worktree, characterize current behavior before extraction, and open an issue-linked PR. Keep each refactor independently reviewable.
Goal
Have build targets reuse the canonical route-metadata text formatter already used by other project commands, retaining a thin compatibility alias only if needed.
Background
Repository-wide duplication review against
f9c18f3294873cbbcda9acc7af7f1bc6b17eed45(2026-09-17).The two
route_metadata_fieldsfunction bodies are AST-identical: both callroute_for_manifestand serialize venv, uv-manager and manifest-command-trust fields. Build targets already importroute_metadata_recordfrom project_commands for structured output, but keep a separate copy of the text-field formatter.Verified source locations:
cli/python/base_projects/build_targets.py:297-305cli/python/base_projects/project_commands.py:48-56No matching open issue was found in the repository backlog.
This is a maintainability refactor. Similarity alone is not evidence of a production failure; any demonstrated differences are called out above.
Scope
Have build targets reuse the canonical route-metadata text formatter already used by other project commands, retaining a thin compatibility alias only if needed.
Acceptance Criteria
Validation
Run build-target and project-command engine tests with project-local/external/uv routes and both trust values. The audit independently verified exact AST body equality.
Run focused checks first, then the repository-required broader checks for the actual implementation. Preserve public command contracts and review
.ai-context/impact in the PR.Non-Goals
No removal or redesign of the current text protocol; no changes to route selection or public command metadata.
Project Fields
Agent Assignment
Implementation-ready scoped follow-up, assigned to
codeforester. FollowAGENTS.mdanddocs/github-workflow.md: start throughbasectl gh issue start, use the canonical issue worktree, characterize current behavior before extraction, and open an issue-linked PR. Keep each refactor independently reviewable.