Skip to content

test: verify resolved preset and golden preservation contracts - #15

Merged
coisa merged 4 commits into
codex/extract-code-standardsfrom
codex/preset-regressions
Oct 25, 2026
Merged

coisa merged 4 commits into
codex/extract-code-standardsfrom
codex/preset-regressions

Conversation

@coisa

@coisa coisa commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Refs #5; depends on #7. This is a bounded regression increment, not completion of the full DevTools/CoiSA policy comparison. It deliberately targets codex/extract-code-standards, as a sibling of #13. Do not merge before the base layer; retargeting requires fresh identity and validation.

Records the actual compiled ECS13.3.8 preset:48 distinct fixers, explicit configuration, exact installed reference and non-risky classification. Tests verify each fixer's source belongs to that installation. Global Composer InstalledVersions changes its ECS identity after the bundled autoloader loads; the snapshot therefore reads installation-specific metadata.

Golden fixtures assert check preserves source, explicit fix matches reviewed bytes, and a second check/fix is stable. They preserve author/package/typed-param/void-return PHPDoc, visibility, mutable DateTime and header position/year. No consumer source is executed.

Preflight: base 9666d997c864e4e74b7ca0ca8cbce849091353a7 → head b5830371299aa6b1b19cf63c893cb317074c9951. Independent read-only reviewer /root/code_standards_review approved this exact head after reexecuting21 tests/208 assertions,19-file syntax/ECS check, Composer strict, actionlint, Changelog contribution and whitespace checks on PHP8.5.11. CI/reviews on the remote head remain separate gates.

Issue5 remains open for fully resolved legacy dependency graphs, headers/Finder comparisons and explicit opt-in decisions. No rules or production behavior change and no consumer migration. Merge still requires passing checks and real current-head Codex AND CodeRabbit without pending findings.

Refreshed through normal merges from the current initial branch; no published history rewritten. Fresh independent read-only review approved this exact updated head after reexecuting the stated tests. Remote reviews/checks must renew. The initial branch still awaits the requested composition in #16 and all resulting gates; no merge or release occurred.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a64e87c0-18e0-496b-8188-81707769a705
Commits

Reviewing files that changed from the base of the PR and between b583037 and fdc1960.

Files selected for processing: 2
  • AGENTS.md
  • tests/Integration/StandardsTest.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Tests
    • Added checks that the configured standards preset matches its reviewed, non-risky rules and configurations.
    • Added examples confirming that checks report style issues without changing files, fixes preserve PHP documentation and code behavior, and subsequent runs make no further changes.
  • Documentation
    • Documented the resolved standards preset, its coverage and limitations, and considerations for dependency updates.

This change documents the resolved ECS 13.3.8 preset and adds tests for its non-risky rule snapshot, golden formatting and preservation fixtures, and stable repeated check/fix runs. It also updates policy and index documentation and adds a patch changelog entry.

Changes: Resolved ECS preset and golden contracts

Layer / File(s) Summary
Preset snapshot and policy
tests/Fixtures/preset-rules.json, tests/Config/PresetTest.php, docs/resolved-preset.md, docs/policy.md, AGENTS.md
The snapshot records 48 non-risky rules and their configurations. The test compares the active fixer snapshot and package metadata with that fixture. Documentation describes the preset, preservation policy, and remaining comparison work.
Golden fixtures and repeat-run checks
tests/Fixtures/style.*.php.inc, tests/Fixtures/preservation.*.php.inc, tests/Integration/StandardsTest.php, .changelog/preset-contract-regressions.md
The integration test checks that validation leaves fixtures unchanged, fixing produces the expected files, and subsequent check and fix runs preserve those files. The changelog records the preset and golden-contract coverage.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related issues

  • php-fast-forward/code-standards#5: The PR adds preset capture, risky-policy checks, golden fixtures, and idempotence checks; broader comparisons remain open.
  • php-fast-forward/dev-tools#240: The PR validates ECS and PHPDoc behavior through preset and golden-fixture tests, but does not implement the wider extraction.
  • php-fast-forward/code-standards#1: The PR adds bounded coverage for non-risky ECS rules, check/fix behavior, and regression fixtures.
  • php-fast-forward/code-standards#4: The PR tests PHPDoc formatting and preservation, but does not implement semantic refactoring.
Merge Risk: Minimal · up to fdc19

The golden test verifies the expected fixed output, and no actionable merge-blocking issue remains after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main changes: verification of the resolved preset and golden preservation contracts.
Description check Passed The description is directly related to the changeset and explains the preset snapshot, golden fixtures, preservation guarantees, dependencies, and scope limits.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

A rabbit checks each rule in line
Then tests the style and docs just fine
The fixtures hold their meaning true
Each second pass stays steady too
Hop, the preset’s recorded through!

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T15:37:57.989031Z fdc1960 New commits
🔒 Security Review 🔄 Running since 2026-10-25T15:36:37.760616Z fdc1960 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

coisa added 2 commits October 21, 2026 16:21
* codex/extract-code-standards:
  fix: load symlinked presets through ECS installation autoload

coisa commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

One supported review request for current HEAD b583037. Your existing status explicitly says review skipped because the target is not the default branch; that is not approval. The owner has requested review and sequential integration of eligible Code Standards PRs, retaining all current-head gates. There is no CodeRabbit execution reported running on this PR and no second request is being made elsewhere by this executor. Please assess the actual source diff; report unavailable allowance rather than treating the request as approval. Existing hosted PHP8.3/8.4/8.5 checks passed and current Codex code review completed without findings. No merge is requested until the actual review is complete and findings are evaluated.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coisa commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Current b583037 review is now real: CodeRabbit finished with no actionable comments/current coverage, Codex code completed/no findings and hosted PHP8.3/8.4/8.5 passed. A current-base integration preflight over7HEAD6e8b4f79 passed27tests244assertions/21PHP syntax+ECS, strictComposer/actionlint/diffcheck. Independent read-only review approved exact merged tree7172c1352b9b3540fde2dac607a8a16d5dc522af and reran the two focused preset/golden tests114assertions.

One normal connector merge attempt was refused by GitHub403: stacked PRs are unsupported by that synchronous endpoint. Readback confirms this PR remains open/merged=false. The documented async endpoint includes all open downstack PRs; using it here would also include7, whose runtime-provenance finding remains valid/unresolved. Therefore no async merge, retry, force, retarget workaround or indirect branch update was made. The remaining issue is stack integration semantics plus7's existing gate, not a skipped review being treated as approval. The candidate remains local for the explicitly requested isolated consumer pilot.

coisa commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Conflict resolution published/read back at fdc1960. This normal merge preserves Felipe's current initial branch b9db059 (including19 and23); the sole manual conflict was the guide index, retaining preset/PHPDoc/static-analysis links. Actual local composer check28tests269assertions,21PHP syntax/ECS, strict Composer, unchanged installedactionlint and diff checks pass. Fresh independent exact-head review approved; remote gates must cover this new HEAD. @coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

@coisa I’ll trigger a review for the new HEAD fdc196079dd1f4b7cbc1fd054187cfd51ec4640b. Earlier review results do not establish coverage of this HEAD. Remote checks must also cover this HEAD before merge.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coisa
coisa merged commit e2ba513 into codex/extract-code-standards Oct 25, 2026
4 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