Fixed CLI path and pointer contract regressions
- Day: 2026-04-24
- Time: 10:35 to 10:45
- Project: Dev
- Workspace: WP 2: Operational
- Status: Completed
- Priority: HIGH
- Assignee: Matías Nehuen Iglesias
- Tags: Cli, Python, Pytest, Path-Regression, Build-Pipeline, Backward-Compatibility
Description
Session Goal
Investigate and patch a set of Python CLI regressions around build/inspect run layouts, pointer-path handling, and artifact promotion so the commands remain compatible with the canonical run directory contract and downstream JSON consumers.
Key Activities
- Identified a naming mismatch between
checkandbuildCLI arguments and traced it to path handling incmd_buildandcmd_inspect_run. - Proposed compatibility-safe fixes that align command behavior with the canonical run directory layout rather than ad hoc registry-local paths.
- Reviewed a backward-compatible migration approach for run inspection output, keeping the existing JSON contract stable while allowing richer metadata to be added.
- Diagnosed a self-copy
SameFileErrorduring artifact promotion and determined the correct fix belongs in the low-levelcopy_filehelper to make promotion idempotent. - Analyzed a pointer-path contract bug where
--latest-successwas accepted by the CLI but the implementation wrote the pointer to the wrong location. - Proposed extending pointer payloads for
latest-successandbuild-failedto includerun_dirand richer artifact paths, matching the manifest/helper record shape already in use.
Achievements
- Clarified the root causes of multiple regressions as contract drift rather than isolated failures.
- Defined a safe patch strategy for build and inspect commands that preserves backward compatibility.
- Established targeted validation steps for the affected CLI flows and tests.
- Aligned the build pointer update logic with the expected user-specified path and richer payload structure.
Pending Tasks
- Implement and verify the
cmd_buildandcmd_inspect_runpath fixes. - Add or update tests covering canonical run layout resolution, pointer-path writes, and backward-compatible JSON output.
- Patch
copy_fileto avoidSameFileErroron self-copy promotion cases. - Confirm the expanded pointer payload shape is accepted by downstream consumers.
Evidence
- source_file=2026-04-24.sessions.jsonl, line_number=2, event_count=0, session_id=3f9ab4523cbbec035939a3b8019d636fa9a38bdf5726f5596abfa4c79e8d92ed
- event_ids: []