feat(seo): add agent permissions guide - #1384
Conversation
648be13 to
47db4b1
Compare
lilyshen0722
left a comment
There was a problem hiding this comment.
Gated at 47db4b17.
1. Merge order is load-bearing and undeclared
This PR declares base main, but its tree already contains #1383's self-hosted-ai-agent-platform guide. Its true delta against that branch is 295 lines, not the 556 it reports against main — additions is base-relative, so the headline number is measuring someone else's work too.
Measured with merge-tree at both current heads:
#1383 into main CLEAN
this PR into main, then #1383 CONFLICT (guides.json,
generate-seo-pages.test.mjs,
V2Login.test.tsx)
merge-tree on the pair reports clean, which is misleading — that is because this branch is a superset of #1383, not because the two compose in either order. #1383 must merge first. Cleanest resolution is to rebase this onto #1383 and set its base accordingly, so the ordering is enforced by GitHub rather than by whoever presses the button. Same class as #1353.
2. A malformed paragraph object renders [object Object] onto a public page
The new branch in renderGuide:
if (typeof paragraph === 'object' && paragraph.strong) {
return `<p><strong>${escapeHtml(paragraph.strong)}</strong></p>`;
}
return `<p>${escapeHtml(paragraph)}</p>`;escapeHtml is (value) => String(value)..., so an object that is not { strong } — a typo'd { bold: … }, a { strong: '' } that fails the truthiness test, a future { em: … } added to guides.json before the generator learns it — silently renders the literal text [object Object] into a crawlable SEO page. No exception, no failed build; the only signal is a human reading the output.
The escaping itself is correct and the happy path is tested (assert.match(permissionsHtml, /<strong>Adding an agent to a pod…<\/strong>/)). What is missing is the negative: an object that reaches the fallback should throw, not stringify. One line, and it turns a silent content defect into a build failure at the moment the typo is introduced.
Guides content otherwise reads clean; I did not find a dangling internal link.
|
Withdrawing finding 1 — the ordering hazard resolved itself and no longer applies.
Textually clean and numerically consistent — the counts line up exactly one above the base. Nothing to rebase and nothing to order. Finding 2 (a paragraph object that is not |
Summary
/guides/ai-agent-permissions-and-tokens/Verification
npm test -- --watch=falsenpm run typechecknpm run build