fix: report malformed executable trust config (closes #2715) - #2719
Conversation
There was a problem hiding this comment.
Copilot review overview
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/apm_cli/commands/marketplace/doctor.py — The doctor row interpolates the raw ValueError message into CLI output. Some ValueError messages… |
What changed in this PR
This PR improves apm doctor diagnostics for executable-trust by ensuring malformed executables: configuration in apm.yml is reported (instead of silently dropping the row), aligning the behavior more closely with apm policy explain and making remediation actionable.
Changes:
- Update the executable-trust drift check to convert
ValueErrorfrom executable-trust parsing into an informational failing doctor row with a clear fix instruction. - Add regression tests covering malformed
executables:shapes (string and list) to ensure the row is always rendered. - Update CLI and packaged guide documentation to describe the new doctor behavior for malformed executable configuration.
| File | Description |
|---|---|
| tests/unit/commands/test_marketplace_doctor.py | Adds parameterized regression coverage asserting malformed executables: is surfaced as an informational failing doctor check. |
| src/apm_cli/commands/marketplace/doctor.py | Refines _executable_trust_drift_check to report invalid project executable configuration while keeping best-effort behavior for other failures. |
| packages/apm-guide/.apm/skills/apm-usage/governance.md | Documents that the doctor row also reports malformed executables configuration. |
| packages/apm-guide/.apm/skills/apm-usage/commands.md | Updates apm doctor command description to include malformed executables reporting. |
| docs/src/content/docs/reference/cli/doctor.md | Updates the doctor reference to explain malformed executables reporting and where it points users for fixes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| except ValueError as exc: | ||
| return _DoctorCheck( | ||
| name="executable trust", | ||
| passed=False, | ||
| detail=f"Invalid executables block: {exc}. Fix 'executables' in apm.yml.", | ||
| informational=True, | ||
| ) |
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 1 | 0 | The ValueError boundary can misattribute malformed user config to apm.yml. |
| CLI Logging Expert | 0 | 2 | 0 | Sanitize malformed-config details and render actionable failures as warnings. |
| DevX UX Expert | 0 | 1 | 0 | The project-config recovery is clear, but the broad ValueError catch can direct users to the wrong file. |
| Supply Chain Security Expert | 0 | 1 | 0 | Escape malformed-config diagnostics before Rich rendering; crafted YAML keys can inject terminal hyperlinks. |
| OSS Growth Hacker | 0 | 0 | 0 | The actionable doctor diagnostic reduces governance setup friction; no growth-surface concerns. |
| Doc Writer | 0 | 0 | 0 | Docs accurately describe malformed project executable-trust reporting, remediation, and informational exit behavior. |
| Test Coverage Expert | 0 | 1 | 1 | Generic malformed blocks pass at unit tier, but no CLI fixture covers repr-bearing non-ASCII errors. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 4 follow-ups
- [Supply Chain Security Expert] Render malformed-config details as literal text with Rich markup disabled or escaped. -- User-controlled YAML keys can currently produce OSC 8 terminal hyperlinks.
- [CLI Logging Expert] Sanitize ValueError details with printable ASCII handling. -- Non-ASCII malformed keys can turn the recovery diagnostic into a UnicodeEncodeError; Copilot independently corroborated this risk.
- [Python Architect] Preserve configuration provenance when validating executable trust settings. -- A malformed user config can currently be reported as an apm.yml error, sending users to the wrong remediation target.
- [Test Coverage Expert] Add a fixture-backed CLI regression using a malformed nested mapping with a crafted non-ASCII markup key. -- The test should assert safe rendering, accurate remediation, and the intended informational exit code of zero.
Architecture
classDiagram
direction LR
class TopLevelDoctorModule {
<<CLIEntryPoint>>
+doctor(verbose)
}
class MarketplaceDoctorModule {
<<ProceduralModule>>
+run_doctor(verbose, logger_name) int
-_executable_trust_drift_check(project_root, logger) _DoctorCheck
}
class ExecutableTrustModule {
<<DomainOwner>>
+parse_project_executables(data) tuple
+build_exec_trust_context(policy, project_data) ExecTrustContext
+resolve_exec_decision(context, package_key, exec_type) ExecDecision
}
class ApproveModule {
<<Gateway>>
+load_org_policy(project_root, logger) ApmPolicy
+scan_installed_executable_packages(path) list
}
class DoctorCheck {
<<ResultObject>>
+name
+passed
+detail
+informational
}
TopLevelDoctorModule ..> MarketplaceDoctorModule : calls
MarketplaceDoctorModule ..> ApproveModule : discovers policy and packages
MarketplaceDoctorModule ..> ExecutableTrustModule : resolves trust
MarketplaceDoctorModule ..> DoctorCheck : creates
class MarketplaceDoctorModule:::touched
classDef touched fill:#fff3b0,stroke:#d47600
flowchart TD
A["apm doctor"] --> B["run_doctor()"]
B --> C["_executable_trust_drift_check()"]
C --> D{"apm.yml exists?"}
D -->|no| E["omit row"]
D -->|yes| F["load project and organization policy"]
F --> G["build_exec_trust_context()"]
G --> H{"builder result"}
H -->|ValueError| I["failed informational check"]
H -->|other error| E
H -->|context| J["resolve trust drift"]
I --> K["render doctor table"]
J --> K
Recommendation
Recommend one focused in-PR revision covering literal sanitized rendering, source-accurate attribution, and the fixture-backed CLI regression; then ship the improved diagnostic.
Full per-persona findings
Python Architect
- [recommended] Report only project-sourced validation errors as apm.yml failures at
src/apm_cli/commands/marketplace/doctor.py:62
build_exec_trust_context()also reads user configuration, so a malformed user setting can be reported as an apm.yml problem.
CLI Logging Expert
- [recommended] Sanitize parser text before rendering it at
src/apm_cli/commands/marketplace/doctor.py:66
Raw project-controlled parser details can violate the printable-ASCII output contract. - [recommended] Render informational failures with a warning status
A failed diagnostic should remain visually actionable even when it does not affect the process exit code.
DevX UX Expert
- [recommended] Do not always direct caught ValueErrors to apm.yml at
src/apm_cli/commands/marketplace/doctor.py:66
A malformed user setting needs a source-accurate recovery action.
Supply Chain Security Expert
- [recommended] Render parser errors as literal text at
src/apm_cli/commands/marketplace/doctor.py:66
Rich markup in a project-controlled key can emit a terminal hyperlink.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
Changes do not affect authentication, token, credential, host classification, or authorization behavior.
Doc Writer
No findings.
Test Coverage Expert
- [nit] Current regression trap protects helper output only at
tests/unit/commands/test_marketplace_doctor.py:824
The two parameter cases pass but do not prove the rendered CLI boundary. - [recommended] Add a CLI-level malformed-config regression trap.
No fixture-backed doctor test currently covers safe rendering, accurate remediation, and the informational exit code.
Performance Expert -- inactive
No performance-relevant hot path is changed.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | No architectural defects; validation remains with the canonical parser and rendering is centralized and safe. |
| CLI Logging Expert | 0 | 0 | 0 | CLI diagnostics are safe, actionable, correctly attributed, and use accurate status symbols. |
| DevX UX Expert | 0 | 0 | 0 | Malformed executable configuration is reported safely without changing informational exit semantics. |
| Supply Chain Security Expert | 0 | 0 | 0 | Diagnostic sanitization, literal Rich rendering, and project-source attribution are adequately hardened. |
| OSS Growth Hacker | 0 | 1 | 0 | Add the required release-facing changelog entry. |
| Doc Writer | 0 | 0 | 0 | Documentation is accurate, concise, discoverable, and consistent with informational exit behavior. |
| Test Coverage Expert | 0 | 1 | 0 | Regression coverage passes at the integration tier; add the required Scenario Evidence mapping. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 2 follow-ups
- [OSS Growth Hacker] Add the doctor fix to the Unreleased changelog. -- This user-visible behavior needs a durable release note.
- [Test Coverage Expert] Add the required Scenario Evidence table to the PR body. -- Map the passing CLI integration test to the secure-by-default and DevX promises.
Architecture
classDiagram
class DoctorCLI
class MarketplaceDoctorModule
class ExecutableTrustRules {
<<CanonicalParser>>
}
class DiagnosticsModule {
+printable_ascii_text(value) str
}
class MarketplaceCommandsModule {
+_doctor_status_icon(check) str
+_render_doctor_table(logger, checks)
}
DoctorCLI ..> MarketplaceDoctorModule : calls
MarketplaceDoctorModule ..> ExecutableTrustRules : validates
MarketplaceDoctorModule ..> DiagnosticsModule : sanitizes
MarketplaceDoctorModule ..> MarketplaceCommandsModule : renders
flowchart TD
A["apm doctor"] --> B["load project config"]
B --> C["canonical project parser"]
C --> D{"valid?"}
D -->|no| E["sanitize parser detail"]
E --> F["render literal failed informational row"]
D -->|yes| G["build trust context"]
G --> H["render trust result"]
Recommendation
The current head is technically ready to ship; fold in the two bounded communication follow-ups so the release record and PR evidence match the quality already demonstrated by the implementation and green CI.
Full per-persona findings
Python Architect
- [nit] Architecture pattern assessment
The canonical-parser preflight and shared status helper are the simplest correct design at this scope.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
- [recommended] Add this user-visible doctor fix to the Unreleased changelog at
CHANGELOG.md:8.
Runtime diagnostics, tests, and docs changed, so the release record must include the user impact.
Auth Expert -- inactive
The touched doctor, test, and documentation files do not change authentication behavior.
Doc Writer
No findings.
Test Coverage Expert
- [recommended] Add the required Scenario Evidence table to the PR body.
The passing integration test proves the safe-rendering and actionable-remediation promise but is not mapped in the PR body.
Performance Expert -- inactive
The touched doctor, test, and documentation files do not change a performance-sensitive path.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | Canonical executable parsing is preserved and rendering remains shared. |
| CLI Logging Expert | 0 | 0 | 0 | Doctor output is clear, safe, actionable, and uses correct warning semantics. |
| DevX UX Expert | 0 | 1 | 0 | Make remediation accurate for the supported allowExecutables alias. |
| Supply Chain Security Expert | 0 | 0 | 0 | Printable ASCII and literal Rich rendering contain terminal injection risk. |
| OSS Growth Hacker | 0 | 0 | 0 | The fix is discoverable in docs, packaged guidance, and the changelog. |
| Doc Writer | 0 | 0 | 0 | Documentation matches the informational-warning behavior. |
| Test Coverage Expert | 0 | 0 | 0 | Malformed configuration, rendering, warning, and exit behavior are covered. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-up
- [DevX UX Expert] Make doctor remediation source-accurate for malformed deprecated
allowExecutables, or use neutral executable-trust guidance, and add an alias regression test. -- The current message sends alias users to the wrong key.
Architecture
classDiagram
class DoctorProbe
class ProjectExecutableParser {
<<CanonicalOwner>>
}
class DoctorRenderer
DoctorProbe ..> ProjectExecutableParser : validates
DoctorProbe ..> DoctorRenderer : supplies safe result
flowchart TD
A["project executable trust config"] --> B["canonical parser"]
B --> C{"valid?"}
C -->|no| D["source-accurate repair guidance"]
C -->|yes| E["build trust context"]
Recommendation
Fold the source-accurate alias guidance and regression test into this PR; no other panel evidence warrants further changes.
Full per-persona findings
Python Architect
- [nit] No architectural follow-up required at this head.
CLI Logging Expert
No findings.
DevX UX Expert
- [recommended] Name the actual malformed manifest key at
src/apm_cli/commands/marketplace/doctor.py:66.
parse_project_executablesvalidates the supportedallowExecutablesalias, but the message always says to fixexecutables.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
The touched files do not change authentication behavior.
Doc Writer
No findings.
Test Coverage Expert
No findings.
Performance Expert -- inactive
The touched files do not change a performance-sensitive path.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | Canonical parser ownership and diagnostic boundaries are preserved. |
| CLI Logging Expert | 0 | 0 | 0 | Diagnostics are actionable, source-accurate, and safely rendered. |
| DevX UX Expert | 0 | 0 | 0 | Diagnostics are safe, actionable, documented, and regression-tested. |
| Supply Chain Security Expert | 0 | 0 | 0 | Project-controlled diagnostics are sanitized and rendered as literal text. |
| OSS Growth Hacker | 0 | 0 | 0 | Actionable diagnostics and aligned documentation remove onboarding friction. |
| Doc Writer | 0 | 1 | 0 | Docs omit the supported deprecated allowExecutables diagnostic path. |
| Test Coverage Expert | 0 | 0 | 0 | Critical doctor failure paths have unit and fixture-backed CLI coverage. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-up
- [Doc Writer] Update the four affected documentation surfaces to describe both executable keys and offending-block reporting. -- Runtime diagnoses both
executablesand deprecatedallowExecutables; the troubleshooting contract should match.
Recommendation
Fold the bounded documentation update into this PR, then ship; the implementation and CI evidence otherwise support release.
Full per-persona findings
Python Architect
- [nit] The implementation is appropriately scoped and preserves canonical ownership.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
The touched files do not change authentication behavior.
Doc Writer
- [recommended] Document the deprecated
allowExecutablesdiagnostic path.
The source names the offending canonical or compatibility key, while current docs mention onlyexecutables.
Test Coverage Expert
No findings.
Performance Expert -- inactive
The touched files do not change a performance-sensitive path.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | Canonical parser ownership and diagnostic boundaries are preserved. |
| CLI Logging Expert | 0 | 0 | 0 | Diagnostics are safe, actionable, and source-accurate. |
| DevX UX Expert | 0 | 0 | 0 | Repair guidance is actionable, documented, and regression-tested. |
| Supply Chain Security Expert | 0 | 0 | 0 | Project-controlled diagnostics are sanitized and literal. |
| OSS Growth Hacker | 0 | 0 | 0 | The doctor warning is consistently documented. |
| Doc Writer | 0 | 1 | 0 | Clarify that only malformed values under either key are reported. |
| Test Coverage Expert | 0 | 0 | 0 | All changed doctor promises have regression traps. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-up
- [Doc Writer] Scope "malformed" to executable-trust configuration under either
executablesor deprecatedallowExecutables. -- This prevents readers from inferring that any deprecated alias triggers a diagnostic.
Recommendation
Fold the bounded wording clarification; no implementation, test, CI, or architectural concern warrants further work.
Full per-persona findings
Python Architect
- [nit] The implementation is appropriately scoped and preserves canonical ownership.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
No authentication surface changed.
Doc Writer
- [recommended] Scope "malformed" to both executable-trust keys.
Say "malformed executable-trust configuration under eitherexecutablesor the deprecatedallowExecutableskey" across all four documentation surfaces.
Test Coverage Expert
No findings.
Performance Expert -- inactive
No performance-sensitive path changed.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 1 | 0 | 0 | Route doctor status icons through canonical STATUS_SYMBOLS. |
| CLI Logging Expert | 0 | 0 | 0 | Diagnostics are safe, actionable, and source-accurate. |
| DevX UX Expert | 0 | 0 | 0 | Current and deprecated key guidance is concrete and tested. |
| Supply Chain Security Expert | 0 | 0 | 0 | Diagnostics are ASCII-sanitized and literal. |
| OSS Growth Hacker | 0 | 0 | 0 | User-facing guidance and changelog are complete. |
| Doc Writer | 0 | 0 | 0 | Documentation matches the implementation. |
| Test Coverage Expert | 0 | 0 | 0 | Malformed executable diagnostics have fixture-backed coverage. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-up
- [Python Architect] (blocking-severity) Route
_doctor_status_iconthroughSTATUS_SYMBOLSand enforce that ownership boundary with a matching architecture test. -- Parallel hard-coded symbols create architectural drift.
Recommendation
Fold the canonical STATUS_SYMBOLS integration and architecture regression test before shipping; no other panel follow-up is warranted.
Full per-persona findings
Python Architect
- [blocking] Route doctor status icons through canonical
STATUS_SYMBOLSatsrc/apm_cli/commands/marketplace/__init__.py:1311.
The canonical-owner table assigns output vocabulary toutils/console.py; literal glyphs duplicate that authority.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
No authentication surface changed.
Doc Writer
No findings.
Test Coverage Expert
No findings.
Performance Expert -- inactive
No performance-sensitive path changed.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | No architectural concerns: doctor reuses the executable parser, ASCII sanitizer, and console status vocabulary with dual guardrails. |
| CLI Logging Expert | 0 | 0 | 0 | Canonical status symbols, safe literal rendering, and actionable diagnostics are correctly guarded. |
| DevX UX Expert | 0 | 0 | 0 | Doctor provides safe, source-accurate remediation while preserving informational exit behavior. |
| Supply Chain Security Expert | 0 | 0 | 0 | Printable ASCII sanitization and literal Rich rendering prevent terminal-control injection. |
| OSS Growth Hacker | 0 | 0 | 0 | Docs and changelog clearly communicate the trust-diagnostic improvement. |
| Doc Writer | 0 | 0 | 1 | Documentation matches the implementation without overstatement. |
| Test Coverage Expert | 0 | 0 | 0 | Malformed-config behavior has unit and fixture-backed CLI regression tests. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Architecture
classDiagram
direction LR
class DoctorCommand {
<<CLIEntryPoint>>
+doctor(verbose)
}
class DoctorRunner {
<<ProceduralOrchestrator>>
+run_doctor(verbose, logger_name) int
-_executable_trust_drift_check(project_root, logger) DoctorCheck
}
class ExecutableTrustAuthority {
<<CanonicalOwner>>
+parse_project_executables(data) tuple
+build_exec_trust_context(policy, project_data) ExecTrustContext
}
class DiagnosticAuthority {
<<CanonicalOwner>>
+printable_ascii_text(value) str
}
class DoctorRenderer {
<<Adapter>>
-_doctor_status_icon(check) str
-_render_doctor_table(logger, checks)
}
class ConsoleAuthority {
<<CanonicalOwner>>
+STATUS_SYMBOLS dict
}
DoctorCommand ..> DoctorRunner : delegates
DoctorRunner ..> ExecutableTrustAuthority : routes through
DoctorRunner ..> DiagnosticAuthority : sanitizes with
DoctorRunner ..> DoctorRenderer : renders through
DoctorRenderer ..> ConsoleAuthority : consumes
flowchart TD
A["apm doctor"] --> B["load project and policy"]
B --> C["canonical executable parser"]
C --> D{"valid?"}
D -->|no| E["printable ASCII diagnostic"]
D -->|yes| F["build trust context"]
E --> G["canonical status symbol lookup"]
F --> G
G --> H["literal doctor table rendering"]
Recommendation
Land exact head 2672a608f1ab5df087b8d9aaff370992b75b65a6; CI is green and no material follow-up remains.
Full per-persona findings
Python Architect
- [nit] Architecture is appropriately minimal and centralized.
_doctor_status_iconadapts_DoctorCheckstate to the canonical console vocabulary without creating another owner.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert -- inactive
No authentication surface changed.
Doc Writer
- [nit] One doctor reference sentence could read more smoothly.
The current wording is accurate and does not overstate behavior.
Test Coverage Expert
No findings.
Performance Expert -- inactive
No performance-sensitive path changed.
Folded in this run
- (copilot) Sanitize raw parser details before CLI rendering -- resolved in
d0dfb9cf31. - (panel) Render malformed configuration details as literal Rich text -- resolved in
d0dfb9cf31. - (panel) Preserve project configuration provenance during validation -- resolved in
d0dfb9cf31. - (panel) Add fixture-backed CLI coverage for crafted malformed keys -- resolved in
d0dfb9cf31. - (panel) Show warning status for failed informational checks -- resolved in
d0dfb9cf31. - (panel) Add the user-visible doctor fix to the Unreleased changelog -- resolved in
bb5369399a. - (panel) Add the required Scenario Evidence table to the PR body -- resolved at
bb5369399a. - (panel) Name the deprecated
allowExecutableskey in remediation -- resolved in52d910715a. - (panel) Document the deprecated
allowExecutablesdiagnostic path -- resolved in4271a96d6c. - (panel) Clarify that only malformed values under either key are reported -- resolved in
674e8547bb. - (panel) Route doctor status icons through canonical
STATUS_SYMBOLSwith dual guardrails -- resolved in2672a608f1.
Copilot signals reviewed
src/apm_cli/commands/marketplace/doctor.py:68-- LEGIT: raw user-controlled parser details violated printable-ASCII output and enabled Rich markup interpretation (resolved ind0dfb9cf31).
Regression-trap evidence (mutation-break gate)
test_malformed_executables_block_is_reported-- deleted project executable parser preflight; test FAILED as expected; guard restored.test_malformed_project_detail_is_printable_ascii-- deletedprintable_ascii_textconversion; test FAILED as expected; guard restored.test_malformed_user_config_is_not_attributed_to_project-- deleted generic builder-error best-effort handling; test FAILED as expected; guard restored.test_rich_detail_is_rendered_as_literal_text-- deleted literalText(c.detail)rendering; test FAILED as expected; guard restored.test_failed_informational_check_shows_warning_icon-- deleted failed-informational status precedence; test FAILED as expected; guard restored.test_malformed_executable_key_is_safely_rendered-- deletedprintable_ascii_textconversion; test FAILED as expected; guard restored.test_malformed_deprecated_alias_names_alias_in_remediation-- deleted alias remediation selection; test FAILED as expected; guard restored.test_doctor_status_icon_uses_canonical_console_vocabulary-- replacedSTATUS_SYMBOLSlookups with literals; test FAILED as expected; guard restored.test_doctor_status_symbols_use_console_owner-- replacedSTATUS_SYMBOLSlookups with literals; architecture test and boundary lint FAILED as expected; guard restored.
Lint contract
uv run --frozen --extra dev ruff check src/ tests/ exited 0 with All checks passed!; uv run --frozen --extra dev ruff format --check src/ tests/ exited 0 with 1677 files already formatted. Pylint R0801, auth-signals, and architecture-boundary lint also exited 0.
CI
All 18 checks passed on the latest head: https://github.com/microsoft/apm/actions/runs/33308105341 (after 0 CI fix iterations).
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #2719 | 2672a60 |
ship_now | 4 | 11 | 0 | 2 | green | MERGEABLE | BLOCKED | pending required review |
Convergence
4 outer iterations; 2 Copilot rounds. Final panel recommendation: ship_now.
Ready for maintainer review.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Render malformed executable diagnostics as literal printable ASCII, preserve project-config attribution, and make informational failures visibly actionable. Adds fixture-backed CLI and mutation-trap coverage; addresses Copilot review and panel follow-ups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the user-visible doctor fix to the Unreleased release record, addressing the final review-panel follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep doctor remediation source-accurate when the supported deprecated allowExecutables alias is malformed. Adds a mutation-proven regression test; addresses the final DevX panel follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document that doctor names malformed canonical and deprecated executable-trust blocks, addressing the terminal doc-writer panel follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make clear that doctor reports malformed values under either executable-trust key, rather than implying every deprecated alias is reported. Addresses the final doc-writer follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route doctor status rendering through the canonical console vocabulary and add behavioral plus static architecture guards. Mutation checks prove both guards fail if literal symbols return; addresses the Python Architect follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2672a60 to
f6aff5e
Compare
|
Rebased onto current main at The exact head rebased cleanly, so no three-way conflicting paths required manual resolution. Main's regenerated Regression tests: the 10 exact doctor and architecture regression cases passed. The rebase did not touch a PR regression-trap test, so no post-rebase mutation-break rerun was required. Lint contract: ruff check, ruff format check, pylint R0801, auth-signal lint, architecture-boundary lint, and the CI YAML/file-length/relative-path guards all passed post-rebase. Post-push mergeability: Ready for maintainer review. |

When an
apm.ymlexecutable trust block is a string or list,apm doctornow renders a failed informational executable trust row with the parser error
and an actionable instruction to fix the
executablesblock instead ofsilently omitting the row.
The fix preserves best-effort handling for policy discovery and user-config
failures. Project-controlled parser details are converted to printable ASCII
and rendered as literal Rich text, preventing malformed keys from injecting
terminal markup. Failed informational checks use the
[!]status whileremaining exempt from the command's non-zero exit decision.
Tests cover malformed top-level shapes, printable diagnostics, configuration
provenance, literal Rich rendering, warning status, and the fixture-backed CLI
path. The doctor reference and packaged guide documentation describe the new
behavior.
Validation
Scenario Evidence
apm doctoron a project with malformed executable trust configuration shows a safe repair instruction without failing the commandtests/integration/marketplace/test_doctor_integration.py::test_malformed_executable_key_is_safely_rendered(regression-trap for #2715)Commands run:
Closes #2715