Skip to content

fix: exclude inline CSS inventory from document selector evidence - #6219

Open
chubes4 wants to merge 12 commits into
trunkfrom
fix/issue-6145-blocks-engine-2
Open

chubes4 wants to merge 12 commits into
trunkfrom
fix/issue-6145-blocks-engine-2

Conversation

@chubes4

@chubes4 chubes4 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Merged trunk and fixed both reported regression failures.

What changed

  • Committed the resolved trunk merge.
  • Preserved unparseable selector lists during pruning.
  • Prevented large inline stylesheets from erasing document subject evidence.
  • Updated public-interface regressions; all four focused tests pass.

Verification

  • acceptance=$(mktemp); bash "$IMPORT_LOOP_GATE" >"$acceptance" 2>&1 & gate=$!; (w: passed on b49e79e. Base trunk@0c76dc9 advanced to cf5da45. 272053 ms; retained gate metadata; output evidence link unavailable.
  • repro: none (no repro gate was declared, so these gates do not prove the issue).
  • CI: pending

Cook run
  • Gate 1: tree 5c5da969001991800b569d03ec5681b57149b734

Out-of-scope changes

A remediation attempt changed files outside the original candidate and the paths it was asked to fix:

  • php-transformer/src/Css/UnreachableSelectorPruner.php
  • php-transformer/tests/unit/complete-document-selector-liveness.php
  • php-transformer/tests/unit/responsive-document-variants.php

Evidence

  • Diagnostic whole-site gate returned pass:true with no visual regressions. CSS excess decreased from 1873.3 to 1655.6; it also reported a fifth local occurrence. Cook's authoritative gate remains decisive.
  • Publication identity: ambient_gh

AI disclosure

Tool: Homeboy Cook. Agent: Homeboy (Implementation 1: Homeboy (pi); Implementation 2: Homeboy (pi)). Model: Implementation 1: Pi · route roadie/cook-heavy · served gpt-6.1-sol; Implementation 2: Pi · route roadie/cook-heavy · served gpt-6.1-sol.

Implementation and reviewer documentation were written by the AI, under the direction of the Cook requester. Gates were run by Homeboy. A human reviews before merge.

@chubes4
chubes4 marked this pull request as ready for review November 16, 2026 07:52
@chubes4

chubes4 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Partial fix only; whole-site acceptance still fails.

  • Merged trunk to restore existing behavior and contract tests.
  • Adjusted pseudo-element selector validation and added a public-interface regression test.

Incomplete candidate; deterministic verification failed.

Task: #6219

incomplete_reason: Acceptance retained 1 occurrence, with excess CSS increasing from 19.3 KB to 21.8 KB. The defect remains unresolved.

Candidate from attempt 3 (wf-import-findings-loop-d266b2ddac91-cook-i1-n0-a1-attempt-3-a950e9cc).

Relates to #6219

Out-of-scope changes

  • php-transformer/tests/unit/pseudo-element-selector-pruning.php

Gate: gate-1 — Failed

Gate output: gate-1

import-loop-gate phase=bare_wp seconds=0
Document body context: 29 assertions passed
Document body context browser: 126 checks across 21 route/viewport cells passed
import-loop-gate phase=contracts seconds=1
import-loop-gate phase=merge_onto_base seconds=0
import-loop-gate phase=reimport seconds=7
{"pass":false,"own":{"before":1,"after":1,"excess":{"before":19.3,"after":21.8}},"blockers_added":["e0097a4a7dd7:1"],"blockers_removed":[],"visual_regressions":[],"visual_unmeasured":0}
import-loop-gate phase=accept seconds=31
import-loop-gate phase=bare_wp seconds=0
import-loop-gate phase=contracts seconds=1
import-loop-gate phase=merge_onto_base seconds=0
import-loop-gate phase=reimport seconds=7
import-loop-gate phase=accept seconds=31
import-loop-gate acceptance_exit=1 repository=skipped until acceptance passes

@chubes4

chubes4 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Fix selector pruning without changing measured visual parity. Local acceptance passes, although CSS remains above the weight threshold.

  • Prune external framework selectors before generated native-block identities can keep absent subjects alive.
  • Allow pruning of unsupported state pseudos while preserving malformed attribute lists and inline specificity ceilings.
  • Add a public-interface regression covering canonical and staged compilation.

Incomplete candidate; deterministic verification failed.

Task: #6219

incomplete_reason: completion not assessed

Candidate from attempt 2 (wf-import-findings-loop-8970513f2bb6-cook-i3-n0-a1-attempt-2-b9fe89f1).

Relates to #6219

Later attempts:
Attempt 3 (wf-import-findings-loop-8970513f2bb6-cook-i3-n0-a1-attempt-3-6004c8d6): Succeeded; no non-empty gate-failed candidate.

Gate: gate-1 — Failed

Gate output: gate-1

Slowest:
    94.1s tests/contract/run.php
    68.0s tests/contract/route-state-ancestor-projection.php
    65.3s tests/contract/staged-artifact-compilation.php
    51.4s tests/contract/runtime-entity-budget.php
    38.2s tests/contract/css-owned-grid-item-minimum.php

--- FAIL tests/unit/artifact-author-stylesheet-projection.php
FAIL: a repeated identical link materializes no alias while authored collision CSS remains a deterministic orphan asset
FAIL: three ordered link instances retain their conditions and one CSS resource without allocating URI aliases or touching authored collision files

--- FAIL tests/contract/wordpress-site-plan.php
PHP Fatal error:  Uncaught RuntimeException: Fixture 37 graph retains exact authored stylesheet provenance for form layout independently of reset padding provenance. in /home/chubes/Developer/blocks-engine@fix-issue-6145-blocks-engine-2/php-transformer/tests/contract/wordpress-site-plan.php:23
Stack trace:
#0 /home/chubes/Developer/blocks-engine@fix-issue-6145-blocks-engine-2/php-transformer/tests/contract/wordpress-site-plan.php(555): {closure:/home/chubes/Developer/blocks-engine@fix-issue-6145-blocks-engine-2/php-transformer/tests/contract/wordpress-site-plan.php:23}()
#1 {main}
  thrown in /home/chubes/Developer/blocks-engine@fix-issue-6145-blocks-engine-2/php-transformer/tests/contract/wordpress-site-plan.php on line 23

--- FAIL tests/contract/shared-author-stylesheet-scaling.php
Context fixture author CSS: 1258 bytes
Route fixture author CSS: 4712 bytes in 1 assets
Variant fixture (leading comment) author CSS: 4704 bytes in 1 assets
Variant fixture (interactive pseudo-classes) author CSS: 2598 bytes in 1 assets
Variant fixture (pseudo-element arm) author CSS: 3736 bytes in 1 assets
Variant fixture (keyframes dropped on one page) author CSS: 3596 bytes in 1 assets
Variant fixture (functional root arm) author CSS: 2878 bytes in 1 assets
Bound fixture author CSS: {"assets\/base.css":5069}
Marker-only fixture author CSS: {"2":844,"6":844,"10":844} bytes for 2/6/10 pages
Plain-arm fixture: {"2":2009,"12":2009,"112":2009} bytes; 0.154 seconds including parity
FAIL: plain-arm published bytes stay roughly constant - {"2":77,"12":211}
shared-author-stylesheet scaling FAILED: 566 passed, 1 failed

1592 tests, 3 failed, 129.3s wall, 32 jobs
import-loop-gate repository_exit=1 acceptance_exit=0

FAIL tests/unit/artifact-author-stylesheet-projection.php
FAIL tests/contract/wordpress-site-plan.php
FAIL tests/contract/shared-author-stylesheet-scaling.php
Script php tests/run.php handling the test:scripts event returned with error code 1
Script @test:scripts was called via test:canonical

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