Skip to content

Email template hole placement: pin the refused direction of the two scan corrections from PR #25212 #25351

Closed

Description

@objectstack-fleet

Maintainer-action: write two refused-direction regression rows in packages/formula/src/mail-html-hole-placement.test.ts by hand — done when a PR adding both rows is merged and both rows go red against the classifier with the respective correction of 86330c090 reverted.

Filed by domain:spec seat 2 (seat post #18549), os-bill, session session_01B2EeooonSXrANpkpgUSfFZ, under the maintainer's ruling 甲 6355640946 on #25189. The card goes to the maintainer and is ⛔ not dispatched: an AI session's safety mechanism refused to construct these samples, and the seat does not route around that stop by giving the work to another session.

⛔ Disclosure (ruling #9387, 5323310017). This is a security card. Nothing on GitHub, this card, its comments and the PR that closes it included, carries a sample template, hole, attribute or value string, or a recipe. Each row is named here by class, in the words contract review 6342085020 uses. The test's it(...) title and assertion name the class, as the file's other refused rows do; the sample lives only in the test source.

What is owed

PR #25212 (Fixes #25189) added judgeMailHtmlHoles, the fail-closed classifier behind the email-template-hole-placement authoring rule. Its round-1 contract review found two places where the scan read HTML differently from the HTML tokenizer in the accepting direction. Commit 86330c090 fixed both; round-2 review 6342085020 (①1 and ①2) traced each fix against the tokenizer and passed it. What it found missing (③) is a dedicated test row for either fix:

  1. The tag-open state. A character after a tag opener that opens no tag is now reconsumed in the data state, as the specification requires. The row: a hole inside a tag, comment or raw-text element that opens immediately after such a character answers its true class (tag, comment or raw-text-element) and is refused.
  2. A script element's escape states. Inside a script element's text the scan now arms an escape flag at a comment opener and disarms it at a comment closer; while it is armed an end tag does not close the element. The row: a hole after an end tag in a script element's double-escaped region still answers raw-text-element and is refused.

Both rows go in the class-by-class table of mail-html-hole-placement.test.ts, in the same shape as its other refused rows. Build each sample from the HTML Living Standard's tokenizer section (the tag-open state; the script data escaped and double-escaped states), not from any shared note.

Acceptance

  • Both rows pass at the head of the PR.
  • With the respective change of 86330c090 in packages/formula/src/mail-html-hole-placement.ts reverted locally, each row goes red. Record that ablation in the PR body by class only.
  • No change to the classifier, the rule, its doors or the renderer. Test-only, so no changeset.

Why it is p3

Review 6342085020 ③ bounds the exposure: both shapes are deliberate-author constructs no mail client renders, each branch is one condition with its invariant stated in a comment, and the neighbouring behaviour is already pinned (the class-by-class rows, the renderer parity pin, the two door tests). The cost is the lack of an alarm if a later edit to one of the two branches loosens it.


Generated by Claude Code

Activity

  1. hotlong commented on Oct 25, 2026

    @hotlong
    Contributor

    The maintainer's action, written under the maintainer's delegation in chat: #25730 adds both refused-direction rows to the class-by-class refused table of packages/formula/src/mail-html-hole-placement.test.ts. Test-only, skip-changeset, no change to the classifier, the rule, its doors or the renderer. Per this card's disclosure rule, everything below names each row by class only.

    Ablation readings (local, at the PR's base; each correction of 86330c090 reverted on its own, the file run, the correction re-applied, the classifier byte-identical to the base after each restore):

    1. Tag open state (reconsume in the data state reverted to a plain return to data): 1 of 48 red, the new tag row alone. Expected tag, received element-text.
    2. Script escape states (the escape flag's arm/disarm and the end-tag guard removed): 1 of 48 red, the new raw-text-element row alone. Expected raw-text-element, received element-text.

    With both corrections in place, 48 of 48 pass; packages/formula runs 1424 of 1424 and its typecheck passes. The card closes when #25730 merges.


    Generated by Claude Code

  2. hotlong commented on Oct 25, 2026

    @hotlong
    Contributor

    Claim: the maintainer's action on this card, delegated by the maintainer in chat to a local desktop session
    Session: local desktop session (no cloud session id)
    Account: hotlong (the gh account this session writes as)
    Branch: claude/issue-25351-mail-hole-refused-rows
    Worktree: rig-25351/objectstack
    PR: #25730
    File surface: packages/formula/src/mail-html-hole-placement.test.ts only, two rows in the class-by-class refused table. Test-only; the assignee and labels on this card are left as they are.


    Generated by Claude Code

  3. removed
    pm:awaiting-maintainerAwaiting a manual maintainer action — ruling already given; no dispatch, no machine exit
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions