Skip to content

refactor(trust): share blocked-command explanations - #2619

Merged
codeforester merged 3 commits into
mainfrom
enhancement/2618-20261019-share-readable-blocked-trust-explanations-across-test-prefli
Oct 21, 2026
Merged

codeforester merged 3 commits into
mainfrom
enhancement/2618-20261019-share-readable-blocked-trust-explanations-across-test-prefli

Conversation

@codeforester

@codeforester codeforester commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Workspace test preflight, individual project commands, and basectl trust status describe the same blocked trust state with different wording. Share blocked_command_summary() across all three paths for missing approval, a changed manifest, and changed test requirements.

Workspace text and JSON detail use the same explanation as command diagnostics and interactive trust status. Each surface keeps its existing layout, identity details, and review/allow guidance. Trust decisions, execution behavior, exit codes, and structured status fields are unchanged.

Issue

Closes #2618

Follow-up to #2613. Addresses the review finding about the remaining trust-status formatter.

Validation

  • The cross-command regression failed before the trust-status fix for all three blocked reasons and passes afterward.
  • Focused workspace/trust/schema tests: 58 passed, 27 subtests passed. The final cross-command regression separately passed with 9 subtests.
  • Coverage compares interactive trust status, individual project preflight, and workspace text/JSON explanations; retains identity and review/allow guidance; and verifies zero delegated test starts when blocked.
  • Targeted Pylint and git diff --check passed.
  • Full local Python suite: 1,830 passed. Runtime stable-compatibility check against origin/main passed.
  • The local bin/base-test shell run was stopped after hosted full-suite validation passed; 492 local shell cases had passed before the next case was interrupted. Full shell-suite evidence comes from CI.
  • Hosted validation on a61f9f2c: 24 successful checks; the optional hosted release-train readback was skipped. Python 3.10–3.13, Pylint, BATS, macOS smoke, integration, pinned and moving-provider Ubuntu source suites, security, compatibility, and branch policy passed.

Demo Impact

None. This aligns diagnostic wording without changing demo behavior or workflows.

Notes

The changelog records the visible wording improvement. .ai-context/ needs no update: this is a formatter consolidation with no product, architecture, command-surface, or trust-contract change. JSON schema version 2 is unchanged; only its existing human-readable detail text changes.

@codeforester codeforester added the enhancement New feature or product improvement label Oct 19, 2026
@codeforester codeforester self-assigned this Oct 19, 2026
@codeforester
codeforester marked this pull request as ready for review October 19, 2026 15:47
@codeforester
codeforester requested a review from a team as a code owner October 19, 2026 15:47
@codeforester

Copy link
Copy Markdown
Collaborator Author

Automated review finding

This refactor correctly routes workspace_test.py's preflight detail and test_preflight.py's print_blocked_command_text through the new shared blocked_command_summary() helper - verified, tests pass, no correctness regressions.

One real gap: print_status_text in the same file (cli/python/base_setup/manifest_trust_guidance.py ~line 43-47) still hand-rolls its own near-duplicate of the blocked-trust message instead of calling the new blocked_command_summary() helper, even though it's right next to it in the same module this PR is refactoring. Its wording ("manifest or declared test requirements changed.") now diverges from blocked_command_summary's ("manifest command or declared test requirements contract changed") - so basectl trust status shows different phrasing than basectl test/workspace-test preflight for the identical blocked state. This is the exact class of duplication the PR's stated goal ("share the same readable blocked-trust explanations... across test preflight and individual project command diagnostics") was meant to eliminate - print_status_text is just the one call site that got missed.

Posted via Claude Code

@codeforester
codeforester merged commit 5e1a147 into main Oct 21, 2026
25 checks passed
@codeforester
codeforester deleted the enhancement/2618-20261019-share-readable-blocked-trust-explanations-across-test-prefli branch October 21, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or product improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share readable blocked-trust explanations across test preflight output

1 participant