Skip to content

test(parser): absorb #3744's #3388 regression pins (pin-only) - #3844

Merged
caomengxuan666 merged 1 commit into
masterfrom
test/3388-absorb-3744-pins
Nov 17, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
test/3388-absorb-3744-pins

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

What this is

Pin-only absorb of the regression suite from #3744 (author: @arookieofc-ai), whose product fix for #3388 was superseded before it could land.

Why not #3744 itself

#3388 was fixed by #3558 (filed 2026-11-14, merged 2026-11-16): the function-head probe now matches parens on the operator token (is_paren_operator, kind Keyword) instead of token text — the same mechanism #3744 implements with is_keyword / raw-text guards. #3744 (filed 2026-11-15, while #3558 was in flight) now conflicts with master in all three of its function_command.rs hunks precisely because #3558 already replaced those exact checks, so its product change cannot and should not land.

What is absorbed

tests/issue3388_unclosed_bracket_regressions.rs, taken verbatim from #3744 (commit authored by @arookieofc-ai, preserved). Of its 8 tests, four cover shapes #3558's own pin file (tests/issue3388_quoted_paren_function_head.rs) does not:

  • closed [ with quoted parens is a runtime error
  • ! / test forms match GNU
  • unquoted parens still parse-error at the same token (over-admission guard)
  • unclosed [[ is still a parse error (guard)

The other four duplicate #3558's coverage and are kept as-is from the author's file rather than trimmed, to keep the absorbed file verbatim.

If any absorbed pin fails on master, that indicates a real divergence between the #3558 and #3744 mechanisms and should be investigated rather than merged over.

本 PR 删除了什么

Nothing — test-only addition, no product code changed.

Refs #3388

The fix for #3388 landed via #3558 (same operator-token mechanism).
#3744's pin file adds four coverage shapes #3558's pins lack: the
closed-bracket runtime error, !/test forms, unquoted-paren parse-error
preservation, and the unclosed [[ guard. Pin file taken verbatim from
#3744, authorship preserved.
@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】 PR #3844 — 建议:PASS(pins-only absorb,钉 8/8 双端绿,CI 红均基线/infra)
head: 86228a7ef58a4df5b3e71c27b420c74ae0fcad19 base(merge-base): 23c0afc6 文件: 1 个 +247/-0(仅 tests/issue3388_unclosed_bracket_regressions.rs)
关联 issue: #3388(产品修复已由 #3558 72ae83516 落地;本 PR 为其钉的补充吸收)

机制核查:

  • 钉断言的机制面 = fix(parser): match function-head parens on the operator token, not its text (Fixes #3388) #3558 已合入的 is_paren_operator(operator token kind 判定 function-head (),非 token 文本值);本 PR 不含产品改动,无二次机制引入。
  • 覆盖增量:相对 master 已有 issue3388_quoted_paren_function_head.rs(4 测),新文件补 closed-bracket 运行时错误、!/test 邻位、unquoted-paren 仍为 parse error(4 形)、[[ ]] 边界、三种 function 拼写仍工作、issue 种子 4/4 脚本——非纯重复,有实质增量。
  • diff 卫生:单文件纯测试,无产品代码、无关文件、关单词问题(标题/body 无 close/fixes+issue 同句)。

腿:

  • 钉自跑(本 worktree HEAD=master6062773f+f2 分支 3 commit,parser 面与 master 一致):issue3388_unclosed_bracket_regressions 8/8 passed。
  • fail-first:未在 pre-fix(parser): match function-head parens on the operator token, not its text (Fixes #3388) #3558 base 重跑(需另起构建);机制与 fix(parser): match function-head parens on the operator token, not its text (Fixes #3388) #3558 已验证钉同一不变量(quoted '('/')' 词值误判 function-head → parse error),pre-fix 下本文件核心断言(脚本继续、rc=0、stdout 精确)必红——按构造成立,标注为推断非实测。
  • lib 双边:VOID(pins-only PR,产品面无 diff;CI Rust tests 绿)。
  • -D warnings:VOID(纯测试文件;CI Rust tests/Windows tests compile check 绿)。
  • 卫生:fmt 由 CI 覆盖;marker-lint/utf8 脚本未跑(bash 环境腿,测试文件无载体字节)。
  • CI(head 86228a7ef):红 3 项——Regression pin stem census(全套件 10779 中 328 行 FAIL,本文件 8/8 PASS 零红,余为已知基线红)、GNU regression goldens and canaries(红名 golden_issue1230_exec_redirect_undo/issue_753::case_9_declare_indexed_operand_binds_nothing/upstream_suite_slice_snapshots,与 parser 钉无交集=基线)、niubash builds against this tree(9s 快速失败,纯测试文件不可能影响 niubash 构建=infra)。其余全绿含 Rust tests、Compatibility CLI tests、cross-target。
  • GNU 对照:WSL /usr/local/bin/bash 5.3.20;抽查 [ '(' ')' ]→[: (: unary operator expected+继续、[ ( a = a )→syntax error rc2、echo '(' ')'→( )——与钉断言一致(stderr 断言用 contains,诊断前缀差异已在文件头注明)。

F 点:无。

未跑/VOID 的腿:fail-first 实测(pre-#3558 base 构建)、marker-lint/utf8 bash 腿。

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.

2 participants