Skip to content

fix: reject ambiguous repository policy JSON - #74

Merged
LE0-Lin merged 1 commit into
mainfrom
fix/strict-policy-json
Oct 24, 2026
Merged

LE0-Lin merged 1 commit into
mainfrom
fix/strict-policy-json

Conversation

@LE0-Lin

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

Copy link
Copy Markdown
Owner

Summary

  • Reject duplicate decoded JSON member names at every repository-config depth instead of adopting the last value, including escaped names, equal-valued repeats and nested suppression objects. Diagnostic text does not echo duplicate member names or values.
  • Reject non-standard NaN/Infinity constants and Boolean format versions. Preserve valid defaults, numeric version 1.0 compatibility, rule scores, missing-config behavior and baseline-governed thresholds/suppressions.
  • Share one configuration document read/decoder with doctor so policy and schema metadata do not come from separate reads. Invalid configuration is operational failure for scan/feedback/compare/diff, or a structured config error for doctor; trusted threshold overrides cannot skip validation.
  • Add 17 focused contracts including real local Git baseline/candidate rejection and worktree cleanup, privacy/overwrite checks and legitimate repeated names in separate objects/string literals. Extend installed-wheel acceptance across both console aliases, module entrypoint and policy-using commands.
  • Synchronize English/Simplified/Traditional core guidance and document the parser/direct-dict/atomicity limits. Source only: no release, version/tag/v0 update, frozen-research change or external maintainer contact.

Verification

  • Reproduced the prior ambiguous-config behavior before implementation; regression log retained locally.
  • Full Windows suite: 494 tests, 484 passed and 10 platform skips.
  • Linux focused policy JSON suite: 17 passed.
  • Wheel and source distribution build passed; all 14 installed-wheel acceptance journeys passed offline.
  • Demo remains F 56. These synthetic engineering checks do not establish real-world accuracy, user adoption or policy adequacy.
  • Runtime source identity: 3a50ee2add42d2e703bbc8b6816e38b9d82c7fe795993e1b72836ad8cc2a759c.
  • Exact-head cross-platform CI and the maintained pinned-repository smoke replay run before merge. An expected operational rejection remains distinct from a clean scan.

@LE0-Lin
LE0-Lin merged commit 6fc26b5 into main Oct 24, 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