Skip to content

Share workspace setup and test repository inspection #2300

Description

@codeforester

Goal

Extract a small immutable repository/manifest inspection result for setup and test target planning. Each operation translates that result into its own target/action and keeps its own eligibility policy.

Background

Repository-wide duplication review against f9c18f3294873cbbcda9acc7af7f1bc6b17eed45 (2026-09-17).

The two approximately 75-line target builders repeat contained-root resolution, missing repository handling, manifest discovery, manifest parsing, invalid-manifest handling and required/fatal flags. Their token similarity is 81.5%. The operation-specific differences are meaningful: setup skips the active Base control plane; test checks whether a test command is declared.

Verified source locations:

Closed #1499 centralized workspace context resolution. This follow-up concerns duplicated per-repository inspection, not that completed context helper change.

This is a maintainability refactor. Similarity alone is not evidence of a production failure; any demonstrated differences are called out above.

Scope

Extract a small immutable repository/manifest inspection result for setup and test target planning. Each operation translates that result into its own target/action and keeps its own eligibility policy.

Acceptance Criteria

  • Common containment, presence and manifest parsing decisions have one implementation.
  • Preserve manifest order, required/optional failure behavior and repository/project names.
  • Preserve setup-only Base skipping and test-only missing-command skipping.
  • Preserve symlink escape rejection and selected-test behavior.
  • No project commands execute while building the plan.

Validation

Run base_projects/tests/test_workspace_setup.py and test_workspace_test.py; cover absent required/optional repos, malformed manifests, shell-only projects, symlink escapes, Base control-plane selection and tests without commands.

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 generic workspace fan-out framework; no merger of setup/test executors, timeout/output models or selection behavior.

Project Fields

  • Status: Ready
  • Priority: P2
  • Area: Workspace
  • Initiative: Contract Hardening
  • Size: M
  • 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 Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions