Skip to content

Reuse one project route-metadata formatter for build and other commands #2305

Description

@codeforester

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

  • Status
    In Review

Relationships

None yet

Development

No branches or pull requests

Issue actions