Protect the main version inside item scopes

This commit is contained in:
2026-10-17 04:48:25 +00:00
parent 884215c403
commit 30bcd8eeb6
3 changed files with 63 additions and 2 deletions

View File

@@ -158,7 +158,12 @@ is an unintended restriction beyond the requested feature.
## 5. Keep default-mode main version ownership inside item scopes — P2
- [ ] Addressed and regression-tested.
- [x] Addressed and regression-tested.
Completion: default-mode effective protection is translated into the main item's
local scope, preserving segment intent and effective diagnostic paths. Both
public entry points reject helper-supplied main declarations and permit unrelated
version fields. Focused source-version tests and the everyday check passed.
**Owner:** the `mainIsItem` branch of
[imports.go](../../internal/engine/imports.go), lines 228–235.