fix: bundle-aware default-scope resolution + open-world doc counts (2.5.30) - #675
Conversation
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks for closing the plugin-only default-scope failure and proving the core-only path remains unchanged. I saw the focused tests and all repository gates pass.
Two items should be addressed before merge:
-
[P2] Preserve invalid env-scope validation (
core/tools/aidlc-lib.ts:3880)
selectionAwareDefaultScope(envScope)now treats any unknownAWS_AIDLC_DEFAULT_SCOPEvalue as a request for the nominated fallback. In a mixed core/plugin install, a typo exits successfully and selects the plugin scope. This contradictsdocs/guide/13-customization.md:66andaidlc-utility.ts:5286-5291, which promise that invalid values fail before state initialization. Please distinguish internal fallback literals such asfeature/pocfrom explicit unknown environment values. -
[P2] Document
freeform_default(docs/harness-engineering/04-scopes.md:33)
This introduces plugin-author-facing scope frontmatter, but the scope schema documentation does not mention it. Please add the field, its selection semantics, and its uniqueness expectation to the scope/plugin authoring documentation.
Non-blocking: multiple enabled freeform_default claimants currently select the alphabetically first scope silently. A compile-time ambiguity guard would make plugin composition safer.
72ec518 to
8b799f7
Compare
|
Addressed both review findings at head
I also closed the non-blocking ambiguity case: graph compilation now rejects multiple enabled Regression coverage pins explicit-env typo rejection, nominated fallback selection, and multiple-claimant rejection. The reported contract, smoke/unit, changelog, and package-parity checks are green. The branch now needs a rebase and version-slot refresh against current |
8b799f7 to
b869450
Compare
|
Rebased onto the current Validation completed locally:
@leandrodamascena, rereview requested. |
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks for addressing the review findings thoroughly. I rechecked the updated head and confirmed:
- Unknown
AWS_AIDLC_DEFAULT_SCOPEvalues fail with the canonical validation error. - Installed-but-disabled scope names still use the intended plugin fallback.
freeform_defaultis documented across the scope and plugin-authoring references.- Multiple enabled nominations are rejected during graph compilation.
The focused tests, package parity, typecheck, lint, and local merge validation all pass. No remaining findings from my review.
Problem
On a plugin-only install (core scopes deselected via plugin selection), several code paths still hardcode core scope defaults: the orchestrator's run-stage DEFAULT_SCOPE params and intent-birth's "poc" fallback crash with "Unknown scope" or route to a disabled scope. Separately, shipped agent-facing prose asserts closed-world counts ("all 32 stages", fixed persona lists) that any plugin install falsifies. On a bundle-only default install, short task prompts can therefore crash at birth or route into an unintended large scope.
What changes
Upstream already carries selectionAwareDefaultScope (sole-enabled-plugin fallback + descriptive errors); this PR adds the remaining bundle-aware behavior:
Out of scope: inferScopeFromText keyword-routing behavior remains byte-identical; the open-world routing path remains the adaptive composer (t67's 28 pins green).
Testing
Note for maintainers: version/CHANGELOG re-bump expected when landing after sibling PRs.