Repository navigation
fix(page): three small defects from the integration audit - #51
Merged
Merged
Conversation
… document The template asked `locate_template()` whether the theme has a `header.php`. Core's `locate_template()` falls through to `wp-includes/theme-compat/header.php` (WordPress 6.7.9 template.php:798), so the answer was always yes, the minimal-document branch never ran, and such a theme got core's deprecated 2010 compat header: its own banner, no viewport tag. Test `file_exists()` under the stylesheet and template directories instead. A render-lane check serves a `headerless` fixture theme and asserts the template's own document, not the compat one; it failed against the old detection. AGENTS.md's render.mjs line pointers move with the inserted lines. Refs #42 Co-Authored-By: Claude Opus 5.5 <[email protected]>
It said the class was there "for the diagnostics loopback probe to recognise". No such probe exists; #39 proposes one. Point at the ticket instead. Refs #42 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s the embed report It does not. On SahajCloud main, `assertClientOriginAllowed()` returns early for an empty list, and `POST /api/clients/report` checks the reported host only when the list is non-empty — its own integration suite stores a report from a client with no list. So check 4's green row for an empty list is right, as its own docblock and AGENTS.md trap 14 already say, and `tests/domains.php` pins it under a ⚠: turning that row into a warning fails "so the panel reports it as fine, not as broken". The defect was the file header contradicting all three. It now names the failure check 4 does catch — a non-empty list without this site's domain — and says an empty one refuses nothing, the report included. AGENTS.md trap 14's pointers had drifted; they point at check 4's ⚠ and the suffix-injection ⚠ again. Refs #42 Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
Both sides added to the same two places. tests/render.mjs: #51's headerless-theme block and this branch's script ordering assertion landed at the same line. Both kept, the ordering one first, since it reads `elementAt` from the assertion above it. AGENTS.md: both sides repointed trap 5's render.mjs reference, so neither number survives the merge. Re-derived against the merged file: 321, on the ⚠ line #51's side had moved it to. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C4H64tVputWUuN3kZXmKMb
Ardnived
added a commit
to sydevs/SahajAtlasWeb
that referenced
this pull request
Oct 1, 2026
#241) The guide's troubleshooting table and the embed-report comment said an empty `allowedDomains` refuses `clients/report`. SahajCloud allows every origin for an empty list there as on the read endpoints (`src/collections/Clients/endpoints/report.ts:156`, `src/plugins/usage/hooks.ts:341` on main). The WordPress plugin repeated the claim and corrected it in sydevs/SahajAtlasWordpress#51. Co-authored-by: Claude Opus 5.5 <[email protected]>
2 tasks done
sydevs-bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
Both sides added a trap 21 to AGENTS.md and both re-aimed trap 20's pointer. Keep both traps: main's `atlas-page.js` footer rule stays 21, this branch's `<title>` ownership rule becomes 22. Trap 20 takes this branch's `seo.php:229`, since the 46 lines added to `includes/seo.php` here are what moved it and main left that file untouched. The merge also drifted two pointers #51 had just re-aimed, because this branch adds lines above them: trap 14's `diagnostics.php:283,495` and trap 5's `render.mjs:321`. Both re-aimed at the ⚠ lines they name in the merged tree. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01216WyJpBSSq1ZXrpayR9Sk
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
header.phpnow gets the Atlas template's own minimal document, not core's 2010 compat header.allowedDomainsrefuses the embed report. Check 4 stays green for an empty list. That breaks from the issue on purpose; see the notes.Test results
pnpm test:all: ✓. Lint covers 12 files, 0 syntax errors. Behaviour suite: 241 assertions, 0 failures. Render lane: 0 failures.headerless: …, classic run): 4 pass. Two of them failed against the oldlocate_template()detection. The served page was core's compat header (<link rel="profile" …>, no viewport tag).pnpm test:browser --only astra,twentytwentyfive:0 failure(s), 0 known, 6 widget finding(s). All six are "the widget's typeface survives the theme" and belong to SahajAtlasWeb. This change does not touch them.tests/domains.php:58, under a ⚠. I made check 4 returnwarnfor an empty list, the change the issue asked for, and that assertion failed (expected: 'ok',actual: 'warn'). Then I restored it.Manual verification
None required. The render lane serves the headerless page. To see it by hand: activate a classic theme that has no
header.phpand open the Atlas page. The source should have<meta name="viewport">and noid="headerimg".Notes for reviewer
Item 2 is not built as the issue asked, because the server does the opposite. An empty
allowedDomainsdoes not refuse the embed report on SahajCloudmain:assertClientOriginAllowed()(src/plugins/usage/hooks.ts:341) returns early for an empty list.POST /api/clients/reportchecks the reported host only whenpatterns.length > 0(src/collections/Clients/endpoints/report.ts:156). That guard has been there since the endpoint landed in SahajCloud#635.tests/int/client-canonical.int.spec.ts) stores a report from a client with no list.So the defect was the file header, which contradicted check 4's docblock, AGENTS.md trap 14 and
tests/domains.php. Making check 4 warn would bring back the confident wrong row that those ⚠ comments record. The ticket's acceptance box "Check 4 is not green for an emptyallowedDomains" is left unmet on purpose. If you want that behaviour anyway, the server has to change first.Cross-repo follow-up, not done here: SahajAtlasWeb repeats the same wrong claim, in
docs/embedding.md:306("an empty list refuses here") and in the comment atsrc/lib/embed-announce.ts:95. Both landed in SahajAtlasWeb#159, one day before the server endpoint. That repo needs a fix or a ticket.Detail
file_exists()underget_stylesheet_directory()andget_template_directory(). These are the same two directorieslocate_template()searches, without its theme-compat fallthrough (6.7.9template.php:794-798). The header variant is not consulted. Core falls back toheader.phpwhen a variant is missing, soheader.phpis the deciding file.tests/fixtures/headerless/isstyle.cssplusindex.php.tests/fixture-theme.phpnow swaps in eithermesmerizeorheaderless, from a strict allowlist. The check asserts both "notid=\"headerimg\"" and "hasname=\"viewport\"". Neither the compat header nor the plainsahaj-classicheader prints a viewport tag, so the second assertion also shows the swap took effect.git merge-treeof this branch withclaude/fix-43-seo-robots-titleis clean. The diagnostics change is one header bullet. It renumbers no check and leaves the check list alone.render.mjs:105→106and298→314. Trap 14'sdiagnostics.php:262,398had already drifted. It now points at check 4's ⚠ (283) and the suffix-injection ⚠ (495), the lines it named when it was written (f6e7bd7).Closes #42
🤖 Generated with Claude Code