-
Notifications
You must be signed in to change notification settings - Fork 17
fix(platform): enforce strict path and version resolution #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alkoleft
merged 10 commits into
alkoleft:master
from
korolevpavel:fix/platform-strict-hint
Jul 26, 2026
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
496a531
docs(platform): design strict resolution
korolevpavel 266d2ab
feat(config): add strict platform configuration
korolevpavel e64709c
feat(platform): enforce strict utility resolution
korolevpavel 2579cfc
fix(platform): harden canonical locator resolution
korolevpavel 076b74c
feat(launch): expose platform resolution metadata
korolevpavel efb222a
test(mcp): align launch resolution fixtures
korolevpavel 294a53a
fix(platform): address final resolution review
korolevpavel 7286a7d
docs(platform): fix plan heading hierarchy
korolevpavel 69f9f8e
chore(merge): rebase platform strict hint onto master
korolevpavel abc5c79
fix(platform): align path version strict contract
alkoleft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
docs/superpowers/plans/2026-07-22-strict-platform-resolution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Strict Platform Resolution Implementation Plan | ||
|
|
||
| > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. | ||
|
|
||
| **Goal:** Add fail-closed platform pinning with coherent installation resolution and observable launch metadata. | ||
|
|
||
| **Architecture:** Add a typed resolution policy at the config-to-locator boundary. Candidates carry their source; strict resolution searches only the explicit boundary and pins one canonical installation root for all platform utilities. | ||
|
|
||
| **Tech Stack:** Rust, serde, schemars, clap integration tests, existing locator and launch contracts. | ||
|
|
||
| ### Task 1: Configuration and path normalization | ||
|
|
||
| - [ ] Add failing model/schema/loader tests for strict and relative platform paths. | ||
| - [ ] Add `PlatformToolConfig.strict`, schema fields, strict-without-path validation, and path normalization. | ||
| - [ ] Regenerate both checked-in schemas and run focused config tests. | ||
|
|
||
| ### Task 2: Typed strict locator | ||
|
|
||
| - [ ] Add failing locator tests for no fallback, exact/prefix mismatch, unknown version, and sibling consistency. | ||
| - [ ] Add typed policy/source/errors and source-aware candidates. | ||
| - [ ] Bind strict resolution to one canonical installation root and capture PATH roots once. | ||
| - [ ] Run the complete locator and utilities suites. | ||
|
|
||
| ### Task 3: JSON and documentation | ||
|
|
||
| - [ ] Add a failing launch JSON test for path/version/source/root metadata. | ||
| - [ ] Extend LaunchResult and mapping without removing the existing binary field. | ||
| - [ ] Update configuration, capabilities, and repo-local skill guidance. | ||
| - [ ] Run formatting, focused integration tests, all-target check, and clippy. | ||
| - [ ] Run independent tester, reviewer, and Rust expert passes; resolve or waive every finding. | ||
| - [ ] Commit, push, and create the upstream PR. | ||
27 changes: 27 additions & 0 deletions
27
docs/superpowers/specs/2026-07-22-strict-platform-resolution-design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Strict Platform Resolution Design | ||
|
|
||
| ## Goal | ||
|
|
||
| Make an explicitly pinned 1C platform installation fail closed when requested, while preserving the legacy discovery fallback by default. | ||
|
|
||
| ## Configuration contract | ||
|
|
||
| `tools.platform.strict` is a boolean with default `false`. `strict: true` requires `tools.platform.path`. The path is normalized relative to the primary config directory. | ||
|
|
||
| When strict mode is disabled, explicit path, default installation roots, and PATH keep the current fallback order. When strict mode is enabled, only the explicit path boundary is searched. A missing requested utility, an unknown version when `tools.platform.version` is configured, or a version mismatch is a typed locator error and never falls back. | ||
|
|
||
| Version requirements retain the existing semantics: four components are exact; two or three components are prefixes and select the highest matching installation below an explicit version root. | ||
|
|
||
| ## Installation consistency | ||
|
|
||
| In strict mode, the first successfully resolved platform utility binds the locator to its canonical installation root. Later resolution of `1cv8`, `1cv8c`, or `ibcmd` uses only a direct or `bin` sibling below that root. A sibling elsewhere in default roots or PATH is rejected. | ||
|
|
||
| Each location carries a typed resolution source (`explicit`, `default-root`, or `path`), an absolute canonical executable path, inferred version, and canonical installation root. | ||
|
|
||
| ## JSON scope | ||
|
|
||
| `launch` already exposes its selected binary as a public result. It will additionally expose structured platform resolution metadata containing absolute path, version, source, and installation root. Extending every command result would require a separate shared-envelope contract migration and is outside this focused locator fix. | ||
|
|
||
| ## Verification | ||
|
|
||
| TDD covers strict missing paths, exact and prefix mismatch, unknown pinned version, versioned-root selection, sibling consistency, legacy fallback, relative path normalization, schema validation, and launch JSON metadata. Default behavior and existing locator tests remain unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.