Skip to content

fix: reject invalid repository policy sources before reading - #78

Merged
LE0-Lin merged 1 commit into
mainfrom
fix/policy-source-boundary
Oct 28, 2026
Merged

LE0-Lin merged 1 commit into
mainfrom
fix/policy-source-boundary

Conversation

@LE0-Lin

@LE0-Lin LE0-Lin commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Distinguish an absent repository-config entry from a dangling/cyclic/unreadable source instead of silently applying compatibility defaults.
  • Require config to resolve to a regular file inside its selected root before content reads; open the resolved target as strict UTF-8. Keep internal file aliases and explicitly selected root aliases. Sanitize source metadata/resolution/read failures without target paths or raw I/O details.
  • Use the existing shared loader for scan, feedback, both comparison trees and doctor. Threshold overrides cannot bypass invalid sources. Preserve baseline-governed policy with tracked relative internal config links, including in temporary Git worktrees.
  • Add 16 focused contracts for invalid sources before reads, normal/internal/root-alias controls, source error privacy, report preservation and real Git baseline/candidate rejection with worktree cleanup. Extend installed-wheel acceptance across console aliases/module/doctor/compare/feedback where the host permits symlinks.
  • Synchronize English/Simplified/Traditional core guidance, external-link migration and Git worktree compatibility. Keep non-atomic/concurrent-replacement, hard-link and mount limits explicit. Workflow-only setup and unscored guardrails remain separate interfaces.
  • Source-only change: no release/version/tag/v0 update, scoring/default change for valid inputs, frozen-research rewrite or external maintainer contact.

Verification

  • Reproduced the old dangling-link fallback/external-read behavior before implementation; regression log retained locally.
  • Full Windows suite: 532 tests, 520 passed and 12 platform skips.
  • Linux policy-source suite: all 16 passed, including FIFO and real Git link fixtures.
  • Wheel/source-distribution build and all 16 installed-wheel acceptance journeys passed offline; link controls disclose platform availability.
  • Demo remains F 56. These engineering contracts are not independent accuracy, adoption or policy-adequacy evidence.
  • Runtime source identity: bca1d4976d359c2f6e37a7068c077691461d8fc117d3df6a6ab3fdb5a10f82ef.
  • Exact-head cross-platform CI and pinned-repository replay run before merge; expected operational rejection remains distinct from a clean scan.

@LE0-Lin
LE0-Lin merged commit 4f92886 into main Oct 28, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant