Skip to content

feat(input): support current-directory project targets - #318

Merged
Teakowa merged 3 commits into
mainfrom
issue-317
Sep 14, 2026
Merged

Teakowa merged 3 commits into
mainfrom
issue-317

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • make omitted CLI input resolve to the current directory; keep explicit - as stdin
  • restrict directory inspection to immediate owner-selection signals; recursive source collection is not performed
  • report OPY/DEL/Workshop mixtures as structured ambiguity; no hidden Workshop precedence
  • delegate OPY directory targets to the owner through LPP 1.2, preserve LPP 1.1 file targets, and route directory inspect through the owner-backed path with an explicit structured unsupported result where the provider exposes compile only
  • preserve the owner-selected primary source identity for wright-result/v1 directory results
  • document file, directory, and stdin input semantics

Dependencies

The source-identity blockers and the Bastion owner blocker are now merged and released. The requested Wright implementation and #317 acceptance evidence are complete; no Wright compatibility fallback is required.

Validation

  • Wright cargo fmt --all -- --check
  • Wright cargo clippy --workspace --all-targets --all-features -- -D warnings
  • Wright cargo test --workspace --all-targets --all-features
  • targeted mixed-kind, provider identity, driver, and CLI tests pass
  • LPP source-identity follow-up: workspace tests and 42/42 conformance fixtures pass; hosted CI green; released as v1.3.0
  • OPY source-identity follow-up: provider tests/clippy pass; hosted CI green; released as v0.1.34
  • released OPY v0.1.36 provider: Overwatch and Bastion zero-argument check pass
  • released OPY v0.1.36 provider: Bastion compile passes and input_identity equals SHA-256 of src/main.opy (3a6483b6a53996b41cf2dfe238150fec41942a7f47d4aeb0d84b99142462e548)
  • repository-root Overwatch auto-detection correctly reports OPY/Workshop ambiguity because the root contains both src/main.opy and a raw Workshop artifact; explicit --kind opy remains the required disambiguation
  • independent ablation reverting only omitted-input mapping to stdin fails the Overwatch project check with structured stdin-empty
  • git diff --check

Refs #317

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • crates/wright-driver/src/input.rs (detect_directory_kind / source_files): Wright recursively walks and collects every OPY/OSTW/Workshop source file, which is explicitly outside #317's scope. It also makes an OPY project containing generated Workshop .txt/.ow/.ws files look like a mixed-owner directory. Restrict this to the minimum owner-selection inspection and leave entry/root/source-closure discovery to the owning language implementation.

  • crates/wright-driver/src/input.rs (resolve_directory): directory inputs set ResolvedInput.identity to sha256(path), but wright-result/v1 defines compile/lint input_identity as the SHA-256 source/input identity. Editing project files therefore leaves input_identity unchanged. Preserve the existing source-identity contract for directory-backed provider results rather than substituting a pathname hash.

  • crates/wright-cli/src/main.rs / wright-driver/src/session.rs: inspect still calls config_from_common(..., false), so an OPY directory stays on the native backend. resolve_directory supplies empty source text for that directory, and the native OPY path can inspect an empty program instead of the selected project. Route a supported OPY directory inspect through its owner, or reject it explicitly; do not silently treat the directory as empty source.

  • #317 acceptance evidence is incomplete: the PR validates project-preprocessing, but the Issue requires zero-argument/current-directory evidence for Bastion and Overwatch-AI-PVE plus independent directory-resolution ablation. Provide those before treating the implementation as complete.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • crates/wright-driver/src/input.rs::detect_directory_kind: the recursive collection is fixed, but the replacement still suppresses a Workshop candidate whenever OPY or DEL/OSTW is detected. That contradicts #317's “no hidden language precedence” AC and docs/cli.md's claim that mixed source kinds fail. Do not treat a Workshop file as generated solely because another owner candidate exists; if it cannot be independently distinguished from a raw Workshop target, report ambiguity.

  • The directory input_identity fix now depends on the new sourceIdentity wire/provider contract, but language-provider-protocol#34 and opy-rs#257 are still open. Merge/release the owning contract/provider first, then verify this consumer path against them; the current cross-repo dependency chain is not complete.

  • The required Bastion zero-argument/current-directory acceptance evidence is still failing with owner include-not-found. That may be an opy-rs defect rather than a Wright defect, but #317's Bastion AC is therefore still blocked rather than satisfied. Fix the owner blocker and rerun the zero-argument workflow before treating this PR/Issue as complete.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wright-side follow-up findings are resolved. Still blocked on the #317 acceptance/dependency chain: language-provider-protocol#34 → opy-rs#257 must merge/release before the source-identity consumer path is complete, and Bastion current-directory evidence remains blocked by the owner include-resolution contract. No new Wright implementation finding.

Teakowa commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Bastion compatibility decision is resolved: do not rewrite Bastion's hosted-OverPy-valid include paths and do not add a Wright-side fallback. The owner defect is tracked in wrightkit/opy-rs#258.

wright#318 remains blocked only for the Bastion real-project acceptance until the opy-rs compatibility fix is merged/released and the zero-argument/current-directory workflow is re-verified. The existing Wright directory-target implementation does not need a compensating semantic change.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The sourceIdentity consumer path is still ahead of its owners: language-provider-protocol#34 and opy-rs#257 are both still open. Merge/release the owner contract/provider first, then verify Wright against that released path.

  • Bastion still does not satisfy #317's zero-argument/current-directory acceptance criterion. Do not use the OWBastion/Bastion#207 macro split as compatibility evidence: opy-rs#148 already merged support for backslash-newline continuations in #! directives, and the current owner work (opy-rs#259) is addressing the remaining include-resolution behavior. Verify the unchanged upstream-valid Bastion source through opy-provider/Wright after the owner fixes are integrated.

@e54-bot

e54-bot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Owner follow-up is now pushed as opy-rs#262 from fix/multiline-define-compat at 9bca8afe443ec38b084152f2341e655694659038.

The local provider built from that commit passes:

  • Overwatch src zero-argument check
  • upstream Bastion zero-argument check
  • Bastion compile, with input_identity matching sha256(src/main.opy) (3a6483b6a53996b41cf2dfe238150fec41942a7f47d4aeb0d84b99142462e548)
  • OPY workspace tests, clippy, fmt, and 38 oracle tests

No new Wright code commit is required. #318 remains pending owner CI, release publication, and then fresh review/reapproval.

@e54-bot
e54-bot requested a review from Teakowa September 13, 2026 19:45
@e54-bot

e54-bot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

The owner blocker is now resolved: opy-rs#262 merged and is included in released opy-provider v0.1.36.

Using that released provider, the unchanged upstream projects now pass:

  • Overwatch src zero-argument check
  • Bastion zero-argument check
  • Bastion compile, with input_identity matching sha256(src/main.opy): 3a6483b6a53996b41cf2dfe238150fec41942a7f47d4aeb0d84b99142462e548

The Wright branch remains at 7e2451b; no consumer-side workaround or new code commit is needed. The #317 acceptance/dependency blockers are resolved. Requesting fresh review for #318.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teakowa
Teakowa merged commit 98bec23 into main Sep 14, 2026
17 checks passed
@Teakowa
Teakowa deleted the issue-317 branch September 14, 2026 04:14
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Make Workshop Great Again Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants