GeezerVison is showing github.com — fix(pm): line-based fence delimiters in extractMetadataPayload by developing-today-fleet[bot] · Pull Request #16017 · developing-today/code
Conversation
Problem
Generated Metadata JSON can carry a title containing triple backticks. extractMetadataPayload used a non-greedy fence regex that stopped at the first backticks anywhere, truncating the payload so the next check rejected its own generated block (webhook edits could repeat the replacement).
Fix
Fence delimiters are now recognized as whole lines only (json ... ); backticks inside JSON string values are left untouched. Rendered JSON can never contain a raw newline inside a string, so a delimiter line is unambiguous.
Out of scope (verified safe, unchanged): pkgs/fleet/hosted-worker/src/metadata.ts parseMetadataBlock is end-anchored and already captures the full payload for delimiter-bearing titles.
Tests
- New round-trip test: render/extract/parse/recheck with title
Document ```json examples; the next check returns current with the title preserved in extras.
bun test test/metadata-ingestion.test.ts in pm-stack/aggregator: 16 pass, 0 fail.
- Fail-first check: the new test fails against the old regex (truncated JSON, parse error).
Closes #16013.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-27T08:58:20Z",
"session_id": "ses_e5de3d69ef3ffeqiuwozXp5qA2",
"lane": null,
"host": "amd",
"worktree": "/home/user/.codex/worktrees/code-g-26165",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/.codex/worktrees/code-g-26165",
"repo": "developing-today/code",
"branch": "code-g/26165-pm-fence-delimiter",
"sha": "9de7e8f58f9cd7f776cf9dc563e53afd4e59d1f6"
},
"auth_subject": "agent-next-23-local",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Backticks inside JSON string values (e.g. a title like
'Document ```json examples') no longer truncate the extracted
payload; delimiters are recognized as whole lines only.
Adds a render/extract/parse/recheck round-trip test with a
delimiter-bearing title. The next check now reads its own block as
current.
Closes #16013 (queue task 26165, lane code-g).
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
66427689-a2fa-4b46-a73c-ef053b884a67
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Duplicate of #16016 (opened ~2 min earlier by lane 0252-B-D, same line-based delimiter fix for #16013). Closing mine to leave a single reviewable PR; branch kept pushed. Local verification for the record: bun test test/metadata-ingestion.test.ts in pm-stack/aggregator 16 pass / 0 fail, and the new round-trip test fails against the old regex. One nuance for the reviewer of #16016: mine takes the first bare ``` line after the opening fence as the close, #16016 takes the last — identical for rendered blocks since stringified JSON never contains a raw newline.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|