Skip to content

feat(prototype): frame a real-stack route from a canonical dev origin in the notes bridge - #17762

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-17749-44851751362-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-17749-44851751362-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17749

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The notes bridge takes a --dev-origin at start (ensure-running and serve). It keeps the value only when dev-origin.mjs finds new URL(input).origin equal to the input and the host is one a CSP host-source can name, so http: //localhost:80, a trailing slash, an uppercase scheme, an IPv6 literal or a host holding a quote are refused. In that mode the bridge serves host.html with the frame's sandbox attribute swapped for a data-dev-origin attribute and HOST_CSP plus '; frame-src <dev origin>', so frame-ancestors 'none' is kept. The host page then frames <dev origin>/, posts only to that origin and drops messages from any other. Design choice and basis: the issue's done-when puts the dev-route frame on the real-stack host page, which is the parent's 'host page already sits on the bridge origin' answer. So no relay frame was added, lib/session-bridge is untouched and mockup mode is unchanged. The canonical check runs in node because the done-when names new URL(input).origin, and the notes flow already runs relocate-note.mjs with node. The choice is recorded in the ui-feedback contract.

The run went past its turn budget (turns=81 max-turns=75): the work may be too big for one run.

Not verified

  • python3 -m unittest test_notes_bridge and dev-origin.test.sh were not run directly: this lane runs no interpreter, and check-affected's output does not list which suites it ran. Left to the PR's CI.
  • tidy skipped: the change touches the shared paths lib/ and scripts/, and spans more than one area
  • Outside this part's done-when and left to sibling parts: the host page always frames <dev origin>/ (no route flag), the app-side harness (proto-pin.js) still posts to its parent with targetOrigin '*', and real-stack.md has no mounting instructions yet

Fix

  • lib/ui-feedback/dev-origin.mjs: new; canonicalOrigin(input) and a CLI that prints the origin or exits 2 with the canonical form to pass
  • lib/ui-feedback/dev-origin.test.mjs: new; node tests for canonical inputs, refused non-canonical inputs (default port, case, path, slash, userinfo, query), non-http schemes, hosts a CSP source cannot hold, and the CLI exit codes
  • lib/ui-feedback/dev-origin.test.sh: new; runs dev-origin.test.mjs under node --test, with its test-scope line
  • lib/ui-feedback/notes_bridge.py: --dev-origin on ensure-running and serve, checked through dev-origin.mjs; NotesHub.dev_origin, devOrigin in /api/ping, host_page() that drops the sandbox and adds frame-src; a restart when the running server frames another dev origin
  • lib/ui-feedback/host.html: in real-stack mode, frames <dev origin>/ instead of fetching /api/page, posts to the dev origin only and drops messages from any other origin
  • lib/ui-feedback/test_notes_bridge.py: TestRealStack (no sandbox, exact CSP with frame-src and frame-ancestors 'none', escaped attribute, mockup frame unchanged, ping) and TestDevOriginAtStart (a non-canonical origin refused with exit 2 by both ensure-running and serve)
  • scripts/shared-copies.txt: registers dev-origin.mjs for plugins/prototype/notes-bridge
  • plugins/prototype/notes-bridge/notes_bridge.py, host.html, dev-origin.mjs: generated copies, refreshed by sync-shared-copies
  • docs/contracts/ui-feedback/README.md: trust rule for a real-stack route framed from its dev origin
  • .changes/prototype/work-resolve-issue-issue-17749-44851751362-1-266f7159.md: minor changelog fragment

Verification

The runner ran each check from the base copy against 90f3727:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 3 fragments valid
  • check-changed-skills: no changed skill, nothing to gate
  • check-affected: 16 passed, 7 skipped (typos not installed, comment-hygiene and size-check could not run here, three validate-plugins steps and changed-skills skipped by the check)
  • sync-shared-copies: exit 0, plugin copies regenerated
  • fresh-context review subagent: 3 findings, all fixed (an HTML attribute injection through a URL-legal host holding a quote, an IPv6 origin that CSP cannot name, an unhandled node timeout or OSError)
  • read https: //www .w3.org/TR/CSP3/: host-char = ALPHA / DIGIT / "-" and host-source has no IPv6 literal form, which is the basis for the host rule in dev-origin.mjs and the contract
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44851751362

Left out: the items under Not verified.

Related

#17749

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44854504938

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d874dc8d82c20579ba150365b3ecfe41fceee19e: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no findings

I read every hunk of both files in scope: lib/ui-feedback/notes_bridge.py and its generated copy plugins/prototype/notes-bridge/notes_bridge.py. Neither file matches a trusted-path glob.

What changed. Each file loses one line: the explanatory comment above FRAME = b'<iframe id="page"'. That comment is Python source, not a standing instruction to a model. No code changed. FRAME, SANDBOX, PAGE_CSP_META and the sandbox replacement logic are byte-for-byte the same as at 5ef908e, which this lane reviewed with no findings.

The push widens no trust control, token scope, kill switch, merge hold or plugin manifest. It removes no instruction surface.

The earlier summary comment from this lane reported no findings, so there is nothing to carry forward.

This was a blocking-only review, because this lane already reviewed an earlier head.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 90f3727da4c4e452e0f731aa05dfa9cb4e6d36ad; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/ui-feedback/notes_bridge.py Resolved
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d874dc8d82c20579ba150365b3ecfe41fceee19e: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): notes-bridge frame anchor comment (#17762)

This review covers only what changed since 5ef908ed, in lib/ui-feedback/notes_bridge.py and its generated copy plugins/prototype/notes-bridge/notes_bridge.py. I read every hunk of both files in the incremental diff. This lane already reviewed an earlier head, so this review reports blocking findings only.

What changed: both files drop one comment line above FRAME = b'<iframe id="page"'. That comment explained why the match is anchored on the frame's tag. No code changed, so the anchor fix accepted at 5ef908ed behaves as before:

  • SANDBOX = FRAME + b' sandbox="allow-scripts"' still matches the iframe only, not the header comment in host.html.
  • The source file and its generated copy still match each other.

Result: no blocking findings.

Closing issue #17749: status unchanged from the last review. A comment-only edit cannot affect done-when 1 or done-when 2.

Other notes:

  • Security is left to the separate security lane.
  • Loosened checks: none in this change. Loosened checks would be marked: fail is the default, because the prompt had no loosened_check_verdict: or loosened_check_patterns: lines. With no loosened_check_decision_record: line, I did not check the citation requirement.
  • No plugin manifest changed.
  • I did not run any tests.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 90f3727da4c4e452e0f731aa05dfa9cb4e6d36ad. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44855591492

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM66QUVW
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-feedback-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 5ef908e
Run 44855591492

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 5ef908e.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44855591492

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44857166740

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44857166740

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a test, which is refused, so it runs one fresh fixer round on this head that must keep the test's assertions. The lane sets no label: the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17762 -f activity=fix-ci

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44857166740

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Comment-lint (necessary posture) failed Lint Repo on
lib/ui-feedback/notes_bridge.py:79. The reason it gave belongs here: FRAME
is anchored on the iframe's tag, so the sandbox attribute quoted in
host.html's header comment never matches. The plugin copy is regenerated
with scripts/sync-shared-copies.sh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head d874dc8d82c20579ba150365b3ecfe41fceee19e, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=d874dc8d82c20579ba150365b3ecfe41fceee19e rubric=10.4.3 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit ecebd71 Nov 21, 2026
56 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17749-44851751362-1 branch November 21, 2026 03:34
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit ecebd7177ef571503214b00b643300f2a00e9f6d; later checks count it verified from this comment.

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.

prototype: notes on a real-stack prototype (feedback picker slice S7) - part 2 of 4

1 participant