Skip to content

Promote Develop to Main: Line-Ending Config Dating - #4630

Merged
ptr727 merged 1 commit into
mainfrom
develop
Dec 4, 2026
Merged

ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Promoted pull requests

  • Date the Line-Ending Configs by the Hub's Own Copies #4628: Date the line-ending configs (.editorconfig, .editorconfig-checker.json, .gitattributes) by the hub's own copy at their path, and report a leaf a copy adds inside a canonical object, so a copy adding Disable.EndOfLine no longer reads current. The owned-key comparison moved to spec/validate.py to hold spec/audit.py under its size ceiling.

Closes #4627

Promotion review findings

None yet.

🤖 Generated with Claude Code

## Summary

The intent advisory for `.editorconfig`, `.editorconfig-checker.json`,
and `.gitattributes` was dated against
`.agents/skills/comment-and-doc-style/references/line-endings.md`. So
every rewording of that prose raised it again for a copy whose local
difference had already been verified.

- **Dating.** Each of the three units now names the hub's own copy as
its `reference`, so it is dated by an edit to the hub's file rather than
to the prose. The hub follows its own line-ending policy, so a real
policy change edits those files too.
- **`.editorconfig-checker.json`.** It declares `repoOwnedKeys:
["Exclude"]`, so a plain-JSON copy is judged by content whatever the
dates read. Its `Disable` block is compared leaf by leaf.
- **Owned arrays.** An owned array is now the repository's to extend
rather than to shrink. A copy lacking an entry the canonical holds is
reported at that key, and a resync takes each baseline entry the copy
lacks. Without this, declaring `Exclude` owned would have hidden a copy
dropping the hub's cache excludes.
- **Ledger.** The `accepted` disposition for
`.editorconfig-checker.json` is removed as redundant.
`reports/divergences.md` still shows it until its next regeneration.
- **Docs.** `spec/fidelity-model.md`, `AUDIT.md`, `RESYNC.md`, and
`spec/checks.json` state the new rules.

Closes #4627

## Verification

- `test_audit_helpers.py` (207 tests), `test_audit.py`,
`test_spec_validate.py`, `test_fidelity_honesty.py`, and the full unit
suite (5541 tests, before the last two commits) all pass. So do ruff,
mypy, `spec/validate.py`, `audit.py --selftest`, `build_dist.py
--check`, `repo_gate.py`, and the prose gate.
- A read-only `spec/audit.py` run over Utilities, HomeAutomation-Config,
and HolidayLights shows no `.editorconfig-checker.json` advisory.
Utilities' copy, whose only difference is an added `Exclude` entry, now
reads current.
- Live copies on `main` of those three repos hold every baseline
`Exclude` entry and the hub's exact `Disable` block. So the superset
rule raises nothing new for them.

## Known Residuals

- **Comment-only edits still date carriers.** A comment-only edit to the
hub's `.editorconfig` or `.gitattributes` still raises the advisory for
`.editorconfig` and `.gitattributes` copies, since the dating
normalization does not strip comments. This follows from the dating
option chosen on the issue, and such edits are rarer than the prose
edits that drove the issue.

## Local Review Findings Fixed

Three recorded `local-strict-review` passes ran. The edit budget was
spent with one finding open, now fixed in this PR:

- **introduced, fixed:** `fleet_owned_differences` now reports a leaf a
copy adds inside an object the canonical holds, such as
`Disable.EndOfLine`. A top-level key a copy adds, and a leaf under an
owned key, stay the repository's own. This is deliberate, since
global.json carriers legitimately add a top-level `test` object. No
fleet C# repository's live `global.json` adds a leaf under `sdk`.

Four further recorded passes ran after the fix. Their code findings were
fixed. Two prose nits are listed rather than fixed:

- **introduced, minor:** `spec/fidelity-model.md` line 14 says a copy
with no added nested leaf is current whatever the owned keys hold. An
owned array emptied of baseline entries still reports, and a leaf added
beneath an owned scalar is exempt. The next sentences and the tests
state both.
- **introduced, minor:** `spec/checks.json` `files.intent` does not
state the exemption for a leaf beneath an owned key.

**Owed:** `reports/divergences.md` still lists the removed
`.editorconfig-checker.json` accepted row. Regenerating it needs live
fleet reads, and the GitHub core API rate limit blocked that run. It is
regenerated with `spec/fidelity_honesty.py --report` once the limit
resets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* JSON consistency checks now flag changes to reference-owned values and
extra entries within reference-held objects, while allowing top-level
additions and growth of owned arrays when required reference entries
remain.
  * Differences are reported regardless of file dates.
* **Documentation**
* Updated guidance to clarify how reference keys, repository-owned
settings, and local edits are handled.
* Revised the divergence report’s dispositions and repository-specific
guidance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings December 3, 2026 23:36
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI 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.

🟡 Changes recommended

An active moderate finding remains because additions under empty canonical objects are not detected, allowing an invalid Disable.EndOfLine leaf to pass validation.

1 open issue
What changed in this PR

Promotes Develop to Main with updated dating and ownership rules for line-ending configuration files.

Changes:

  • Dates line-ending configs against their hub copies.
  • Adds JSON ownership checks for arrays and nested leaves.
  • Updates audit documentation, tests, and generated reports.
File Description
tests/​test_audit_helpers.py Covers new ownership behavior.
spec/​validate.py Implements shared JSON comparison logic.
spec/​files.json Declares references and owned keys.
spec/​fidelity-model.md Documents fidelity rules.
spec/​divergences.json Removes redundant disposition.
spec/​checks.json Updates check metadata.
spec/​audit.py Uses the shared comparison helper.
RESYNC.md Updates resync guidance.
reports/​divergences.md Refreshes the generated report.
AUDIT.md Updates audit behavior documentation.

Review effort: Lite

Comment thread spec/validate.py Resolved
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.47%. Comparing base (901c575) to head (5c797e0).
⚠️ Report is 540 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4630      +/-   ##
==========================================
+ Coverage   78.45%   78.47%   +0.01%     
==========================================
  Files          58       58              
  Lines       17857    17873      +16     
==========================================
+ Hits        14010    14026      +16     
  Misses       3847     3847              
Flag Coverage Δ
python-3.13 78.47% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 5e21428 into main Dec 4, 2026
13 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.

Intent Advisory Re-Fires on Every Line-Endings Doc Edit for a Verified Local Difference

2 participants