Skip to content

[PR] [bili-blog-pipeline] record discussion threads (meet-bili→#5550, frequent-compression→#5551, compress-at-fold-point→#5552) - #5553

Open
github-actions[bot] wants to merge 3 commits into
masterfrom
bili-blog-pipeline-manifest
Open

github-actions[bot] wants to merge 3 commits into
masterfrom
bili-blog-pipeline-manifest

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Automated by the blog pipeline (scripts/blog-discussions.mjs).

Records newly created Discussion thread numbers into website/articles.json.
Repo policy: the pipeline never pushes master directly; numbers land here
as exactly one PR for a human merge (same posture as release-manual.yml).

  • One file changed: website/articles.json.
  • Safe to squash-merge. If the pipeline runs again before this merges,
    the same branch/PR is refreshed in place.
  • Until merged, the discussion button stays hidden — nothing breaks.

@ranxianglei ranxianglei changed the title [bili-blog-pipeline] record discussion threads (meet-bili→#5550, frequent-compression→#5551, compress-at-fold-point→#5552) [PR] [bili-blog-pipeline] record discussion threads (meet-bili→#5550, frequent-compression→#5551, compress-at-fold-point→#5552) Nov 2, 2026
@ranxianglei
ranxianglei force-pushed the bili-blog-pipeline-manifest branch from bc9c779 to 77afef1 Compare November 11, 2026 03:28
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

📦 Built Package Artifact

Branch: bili-blog-pipeline-manifest (49f1563)

Latest build — install this exact version

npm install -g billion-context@0.0.9082-pr.5553.c04a5ea

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
49f1563 billion-context@0.0.9082-pr.5553.c04a5ea build
77afef1 billion-context@0.0.9051-pr.5553.0c8dfbf build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5553.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Conflict resolved. Rebased bili-blog-pipeline-manifest onto current master and force-pushed (lease-pinned to the pre-rebase sha; remote head was unchanged, so no concurrent work was clobbered). New head: 77afef1897.

What happened: the branch was cut from Nov-1 master (db73897a45) and master has since moved ~916 commits ahead — including PR #6150, which removed the compress-at-fold-point article and its website/articles.json entry. The pipeline commits add discussion fields to entries in that same file, so both sides rewrote the same region → dirty.

Resolution followed union-of-intent, minimal and faithful:

  • Commit 1 (original thread numbers): kept discussion fields for the two surviving articles; did not resurrect the fold-point entry that master deliberately deleted.
  • Commit 2 (pipeline refresh run): kept the refreshed numbers — meet-bili→6162, frequent-compression→6163 — superseding the intermediate values.
  • Final branch diff vs master is exactly two added lines in website/articles.json; no other file touched, JSON validated parseable.

Live verification this run (mirror cache, fetched 03:34Z+): mergeable_state flipped dirty → blocked on the new sha — i.e. mergeable again, held only by still-running required checks. CI summary at last poll: total 30 / failed 0 / pending 12 (test-matrix shards in progress; 11 env-gated e2e lanes skipped, normal for a website-only diff; static-gates ubuntu already green). If any shard goes red I'll pick it up in the next lane attempt (this was attempt 1/3). Merge remains human-only.


七问

  1. 是什么问题:博客流水线的 manifest PR([PR] [bili-blog-pipeline] record discussion threads (meet-bili→#5550, frequent-compression→#5551, compress-at-fold-point→#5552) #5553)与 master 冲突(dirty),无法合并。
  2. 什么原因导致的:分支基于 11-01 的旧 master(db73897);此后 master 合入 [PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 #6150 删除了 compress-at-fold-point 文章及其 articles.json 条目,而 PR 两个提交在同一文件同一区域添加 discussion 字段——双方改动重叠产生文本冲突。
  3. 影响范围与严重程度:仅影响博客页 discussion 按钮的记录数据(合并前按钮保持隐藏,无功能破坏);严重度为合并阻塞级,无用户可见缺陷。
  4. 怎么修复的:把两个流水线提交 rebase 到当前 master(33104b1),按意图并集解冲突——保留两篇存续文章的 discussion 字段、采纳第二个提交的刷新编号(6162/6163)、不复活 master 已删的 fold-point 条目;最终对 master 的 diff 仅两行数据。
  5. 是否有回归问题:无。纯数据追加,未触碰任何代码路径;核对过既有行为——master 原有两条文章条目逐字保留、顺序与格式不变、JSON 通过解析校验。
  6. 是否破坏缓存:不涉及——未触及任何缓存/重试/游标逻辑。
  7. 是否改了设计方向或引入新配置:均无。

收工判定:冲突已解除并实证(dirty→blocked),CI 在途 0 失败,等待人工合并。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

CI 已全部跑完,全绿。 Full report above (floor 5) — here is the final verified state, mirror cache fetched 03:56Z on head 77afef1897:

  • Checks: total 30 / failed 0 / pending 0 (19 passed, 11 env-gated e2e lanes skipped — normal for a website-only diff).
  • mergeable_state: blocked — conflict is resolved; the PR is now held only by the required-review gate ("绿灯待审", reviewer dispatched per floor 4), not by any check or conflict.
  • Build pipeline already produced the test artifact for this head (billion-context@0.0.9051-pr.5553.0c8dfbf, floor 3), confirming the rebased branch builds clean.

Nothing left for the CI lane: rebase landed, all checks green, remaining step is human merge only.

…frequent-compression)

The 2026-11-11 refresh run recorded #6162/#6163, duplicate threads that were deleted shortly after creation; the originals from the 2026-11-02 run still live. Pointing the manifest at them keeps the panel discussion buttons on live threads.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

(ai: vllm-qwen/qwen3.8-27b)

APPROVE — merge stays human-only (§7.4). Scope: bot write-back from scripts/blog-discussions.mjs; one data file; no code.

Independent verification (not taken from PR text)

  1. Diff vs master at head 49f15633eb: only website/articles.json changed — the two pre-existing entries each gain one discussion field (meet-bili→5550, frequent-compression→5551); entries otherwise byte-identical, order/format unchanged; JSON parses; both referenced post files exist.
  2. Consumer contract matches exactly: src/web/blogfeed.ts:498 accepts only integer>0 (else dropped → button hidden); src/web/client.ts:1057-1058 renders …/discussions/<num>. No test pins real manifest numbers (suites use synthetic fixtures), so no test coupling either way.
  3. Thread liveness via GraphQL (read-only): #5550 “Meet billion-context · 认识 billion-context” and #5551 “What to do when billion-context compresses frequently? · billion-context频繁压缩该怎么办?” are ALIVE; titles equal the articles’ frontmatter title/title_zh joined per threadTitle().

Finding fixed on the spot (the only code change of this review)
The head I was dispatched against (77afef189) recorded #6162/#6163 — duplicate threads created by the 2026-11-11 refresh run, deleted shortly after creation (verified live at 12:55Z, NOT_FOUND by 13:11Z). Merging as-is would ship panel buttons pointing at dead threads (404), and per the pipeline’s own verifyRecorded semantics (“a vanished thread is NOT resurrected automatically”) it would never self-heal. Fixed by commit 49f15633eb, which points the manifest at the surviving original threads from the 2026-11-02 run.
已顺手修:manifest 指向的 #6162/#6163 是创建后数小时内即被删除的重复线程(照原样合并会让面板按钮指向 404,且按流水线设计不会自愈)——改指存续原线程 #5550/#5551 + commit 49f1563

Root cause of the duplicates (out of scope for this data PR — escalated separately as the 🔶 需要决策 comment below): idempotency layer 2 scans GraphQL bodyText for the invisible marker <!-- bili-blog:<slug> -->, but bodyText strips HTML comments (proven on #5550, written by this same script whose marker code has existed since its first commit 03473b1). While this PR sits unmerged, every qualifying blog push re-creates another duplicate pair; merging promptly stops that machine for the current entries (layer 1 then covers them).

Regression sweep: pure additive data on a defensively-parsed manifest; no code path, cache/retry/cursor logic, config surface, or kernel/ touched. PR title still lists the Nov-02 numbers incl. the fold-point thread (stale after the rebase onto #6150) — title is system-pipeline-owned per AGENTS.md, left untouched.

CI: new-head run in progress at posting (guards green, 0 failures so far); the identical-shape previous head went 30/30 green.


八问

  1. 是什么问题:博客流水线的 manifest PR——把两篇文章的 GitHub Discussion 线程号记入 articles.json,面板文章页才能显示讨论入口(合并前按钮保持隐藏)。
  2. 什么原因导致的:我接到的 head 记录了 11-11 流水线重跑创建的重复线程 #6162/#6163——幂等第二层(marker 扫描)因 GraphQL bodyText 剥离 HTML 注释而结构性失效,扫不到已存在的 #5550/#5551 便重复建帖;重复帖随后被人工删除。
  3. 影响范围与严重程度:修复前=合并后面板按钮指向 404(用户可见缺陷,且按流水线设计不自愈);修复后=零缺陷,纯数据追加。
  4. 怎么修复的:manifest 两个数字改指存续原线程 #5550/#5551(GraphQL 独立验证存活、标题与文章 frontmatter 逐字一致);流水线脚本缺陷不塞进本数据 PR,单独走 🔶 升级。
  5. 是否有回归问题:无回归——diff 仅给两条既有条目各加一个字段,条目本体/顺序/格式逐字不变,JSON 过解析校验,消费端谓词(integer>0)匹配,零代码路径触碰。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无。
  8. 是否引入新配置:无。

判定:可合(PR body 声明 squash-merge safe;合并权按 §7.4 留人工)。建议尽快合并——未合并期间每次命中博客面的 push 都会再产生一对重复讨论帖(见下方 🔶 评论)。

@ranxianglei

Copy link
Copy Markdown
Owner

🔶 需要决策: blog pipeline idempotency layer 2 is structurally dead — duplicate discussion threads re-create on every qualifying push while the manifest PR is unmerged

PR: #5553 (this thread). Gated diff: none inside this PR — the defect lives in scripts/blog-discussions.mjs, which this data write-back does not touch; escalating because fixing it changes a safety-mechanism behavior and needs an owner call on approach.

Evidence chain (all verified independently during review):

  1. threadBody() appends the invisible marker <!-- bili-blog:<slug> --> to every created thread (scripts/blog-discussions.mjs:217); the crash-recovery scan findMarkerInRecentDiscussions() (scripts/blog-discussions.mjs:269-292) looks for that marker inside GraphQL bodyText.
  2. GraphQL bodyText strips HTML comments. Proof: discussion Meet billion-context · 认识 billion-context #5550 was created by this exact script (marker code present since its first commit 03473b1, 2026-11-01), yet its bodyText contains no “bili-blog:” substring at all (markdown emphasis/blockquote markers are stripped too — bodyText is rendered plain text).
  3. Production consequence already observed: the 2026-11-11 02:24Z refresh run (triggered by [PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 #6150 touching articles.json) failed to find Meet billion-context · 认识 billion-context #5550/What to do when billion-context compresses frequently? · billion-context频繁压缩该怎么办? #5551 and created duplicates #6162/#6163; those were deleted manually within hours. This review’s fix commit 49f1563 points the manifest at the surviving originals.
  4. Residual risk while unmerged: layer 1 (verifyRecorded) only protects numbers already recorded ON MASTER — master still has none → every further push touching website/blog/posts/** or website/articles.json creates yet another duplicate pair. Merging this PR is NOT gated by this decision, and merging mitigates it (layer 1 then covers the current entries).

Options:

  • A (recommended): scan REST GET /repos/{owner}/{repo}/discussions pages instead (raw body, same api.github.com host the script already uses, existing ghJson helper). Keeps the invisible-marker format, fully backward-compatible with existing threads’ markers, single-function rewrite (~30 lines), zero new deps.
  • B: make the marker visible footer text in new threads — changes user-visible thread content format; old threads’ invisible markers still unmatchable → strictly worse backward compat than A.
  • C: accept the risk (rely on layer 1 + prompt merges) — duplication window persists for any period where a thread exists but its number is not yet on master.

Recommendation: A. Deliberately not bundled into this PR (data write-back vs pipeline script; bot-refreshed branch). Requesting owner decision: approve A / pick B / accept C.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Review complete — verdict: APPROVE (posted on GitHub: #5553 (review)). Merge remains human-only per §7.4.

查重:不重复 — single pipeline write-back PR; verified via pulls?head=ranxianglei:bili-blog-pipeline-manifest that #5553 is the only open PR on this branch. No other open/closed issue or PR covers the same scope.

标签:needs-decision(流水线幂等缺陷需 owner 拍板修法,见下)· scope/ui(博客面板数据面)· p3(修复后本 PR 零缺陷;残留问题仅产生可清理的重复讨论帖,无数据损坏)。

已顺手修:manifest 指向的 #6162/#6163 是创建后数小时内即被删除的重复线程(照原样合并会让面板按钮指向 404,且按流水线 verifyRecorded 设计不会自愈)——改指存续原线程 #5550/#5551 + commit 49f1563(已推分支,diff vs master 仍仅两行数据)。

What I verified independently (not from the PR text):

  • Diff vs master at final head 49f15633eb: only website/articles.json, two pre-existing entries each gaining one discussion field, otherwise byte-identical; JSON parses; both referenced post files exist.
  • Consumer contract: src/web/blogfeed.ts:498 accepts integer>0 else drops the field (button hidden); src/web/client.ts:1057-1058 renders …/discussions/<num>. No test pins real manifest numbers (synthetic fixtures only).
  • Thread liveness via GraphQL read-only: Meet billion-context · 认识 billion-context #5550 and What to do when billion-context compresses frequently? · billion-context频繁压缩该怎么办? #5551 alive; titles match the articles' frontmatter title/title_zh exactly. The as-dispatched head's numbers (#6162/#6163) were deleted within hours of creation — confirmed live→NOT_FOUND across two probes.
  • CI on the fixed head: 30 checks / 0 failed / 0 pending (mirror cache) — fully green, same shape as the previous head's 30/30.

🔶 需要决策 (escalated on-thread on GitHub: #5553 (comment), label applied here): the pipeline's idempotency layer 2 is structurally dead — it scans GraphQL bodyText for the invisible marker <!-- bili-blog:<slug> -->, but bodyText strips HTML comments (proven on #5550, written by the same script). Consequence: while this PR sits unmerged, every qualifying blog push re-creates duplicate discussion threads (today's deleted pair #6162/#6163 is the observed instance). Options A/B/C with recommendation A (switch scan to REST discussions list returning raw body) are in that comment; merging this PR is NOT gated by the decision and merging mitigates it. Script untouched in this review — out of scope for a data write-back.


八问

  1. 是什么问题:博客流水线的 manifest PR——把两篇文章的 GitHub Discussion 线程号记入 articles.json,面板文章页才能显示讨论入口(合并前按钮保持隐藏)。
  2. 什么原因导致的:我接到的 head(77afef1)记录了 11-11 流水线重跑创建的重复线程 #6162/#6163——幂等第二层(marker 扫描)因 GraphQL bodyText 剥离 HTML 注释而结构性失效,扫不到已存在的 Meet billion-context · 认识 billion-context #5550/What to do when billion-context compresses frequently? · billion-context频繁压缩该怎么办? #5551 便重复建帖;重复帖随后被人工删除。
  3. 影响范围与严重程度:修复前=合并后面板按钮指向 404(用户可见缺陷,且按流水线设计不自愈);修复后=零缺陷,纯数据追加。
  4. 怎么修复的:manifest 两个数字改指存续原线程 Meet billion-context · 认识 billion-context #5550/What to do when billion-context compresses frequently? · billion-context频繁压缩该怎么办? #5551(GraphQL 独立验证存活、标题与文章 frontmatter 逐字一致);流水线脚本缺陷不塞进本数据 PR,单独走 🔶 升级待 owner 拍板。
  5. 是否有回归问题:无回归——diff 仅给两条既有条目各加一个字段,条目本体/顺序/格式逐字不变,JSON 过解析校验,消费端谓词(integer>0)匹配,零代码路径触碰;高危模式(语义漂移/fail-fast 变吞错/阈值时序格式漂移)逐项核对均不涉及。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无。
  8. 是否引入新配置:无。

收工判定:APPROVE 已提交,新 head CI 30/30 全绿,PR 仅剩人工合并一步——建议尽快合并:未合并期间每次命中博客面的 push 都会再产生一对重复讨论帖(根因见 🔶 评论)。本 lane 工作完毕。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant