Repository navigation
WIP: executor: single command-name registry, data only (#2036 S1) - #2050
Conversation
Probe battery from the #2036 audit (§4 precedence matrix, probes2.sh; §3.1 introspection run): 20 pins asserting the engine's measured behavior verbatim, warts included (existence-gate replacement of script/ELF fakes, the command-prefix split answers, comsub basename's unchecked stand-down cell, the compgen -b / enable -a env drift). Zero behavior change; the battery is green on unmodified master and exists so S2-S4 adjudications diff against pinned current behavior.
One const table (111 rows) recording every name the engine claims on any face, with the audit §6.2 field set: class, per-entry impl pointers, admission, the two-axis stand-down policy, function-shadow, enable -n, introspection, cfg, hash recording, slash forms, sync_ref, doc_id. Nothing dispatches from it yet (S2-S4 project the consumers); 16 in-module consistency tests pin the table against the live code (predicates, builtin lists, literal scans of all claim sites) with the known drifts as explicit both-direction pins: - KD-1: env missing from complete.rs SHELL_BUILTINS (audit M23) and from enable.rs ALL_BUILTINS (new find: enable -a omits env and enable refuses to manage it) - KD-2: enable.rs SPECIAL_BUILTINS vs the executor predicate differ by exactly 'source' (adjudication deferred to S2/S3) Also records audit-map gaps found while registering: a second reserved-word table (is_reserved_word, 17), the pipeline stage restricted-shell guards claiming cd/exec/./source/command, and two audit count corrections (keywords 22 not 23, POSIX specials 15 not 14). Zero behavior change: production diff is the new data file plus a two-line module declaration.
6f4867d to
999a498
Compare
|
门账更新(头 999a498): 修正一钉:首轮 CI 红的唯一自有项是 canary 归因:首轮「Ledger covers everything niubash consumes」红在基线 master 1a6f9c9 本体亦存在(非本片引入);终版头的有效合并基已含 master 侧 census 修复,canary 全步通过(含 -D warnings 的 cargo check 步)。 终版头 CI 全绿(run 40817423633 / canary 40817423600):Rust tests(lib 954 钉,含本片 16 个一致性钉逐名 PASS,已对作业日志逐名核对)/ Rust tests (macOS) / GNU regression goldens and canaries / Shell functionality tests / Cross-target check ×2 / API ledger tripwire / niubash builds against this tree。 电池的执行证据:断言在开发期已逐形对审计构建(5ec322cb,master 线)实测预验全过;本地全跑在本机写盘波次平息后补本评论。 |
Local execution of the battery (18/20 on first run) caught two expectation errors in the battery itself; the engine's behavior matches the audit on both faces, re-verified by hand against the locally built binary: - shape 1' used the pipeline form, whose ELF-fake answer is yield (stdout empty, exactly what the W5 wart pin asserts); the audit's shape 1' is the SIMPLE form, where the engine replaces the ELF fake and prints the file. Pin now uses the simple form. - the introspection pin searched for name="file" with literal quote characters; the shell loop's quotes are grouping, the real output lines are name=file. All 25 names do report file. Battery now 20/20 locally; lib consistency pins 16/16 locally.
|
本地门终账(头 02f8568,更正前一条评论的「本地全跑待补」): 本地实跑已落地:lib 一致性钉 16/16 通过;电池首跑 18/20,两红均为电池自身期望写错、零引擎漂移,已在 02f8568 修正并复跑 20/20:
即:本片全部断言最终均在本机 master 线构建(1a6f9c9a)上实跑验证,与 CI 绿互为独立证据。 |
Refs #2036(S1 片;本单随 S1–S6 全落地才关,本 PR 不写 Fixes)
内容
按 #2036 审计 §8 的 S1 定义落地「注册表数据先行」:
tests/issue2036_precedence_introspection_regressions.rs,20 钉):审计 §4 挑序矩阵 13 形 + §3.1 内省面,断言 = 现行行为逐字(含疣)——存在性门顶替脚本/ELF 假身、command前缀三名三答、comsub basename 不查让路谓词(B1)、管线臂对 ELF 假身让行(B5)、compgen -b 与 enable -a 的 env 漂移。开发期已逐形在审计构建(5ec322cb)上预验;本 PR CI 与本地门复核为准。src/executor/command_registry.rs):111 行 const 数据,§6.2 全字段(class / 逐入口 impl 指针 / admission / stand_down 双轴 / function_shadow / enable_n / introspection / cfg / hash_record / slash_forms / sync_ref / doc_id)。零行为变更:生产 diff = 新数据文件 + mod.rs 两行声明,无任何分发路径读表(消费者在 S2–S4 投影);注册表为 const 静态数据、无锁无哈希图(§5 C1/C2)。已知差(只钉不改,归宿在钉内注释)
SHELL_BUILTINS(compgen -b 漏 env,审计已记)与 enable.rsALL_BUILTINS(S1 新发现:enable -a 漏 env 且enable env直接报 not a shell builtin) 都不含。归宿 S2。SPECIAL_BUILTINS(16)与 executor 谓词集(15)对称差恰为source(GNU builtins.def 中 source 确为特殊内建——哪侧错待 S2/S3 按 GNU 源码裁定)。与审计账的出入(代码为准)
关键词实测 22 非审计的 23;POSIX 特殊实测 15 非 14;审计地图未列三处散点已登记并钉住:
is_reserved_word第二保留字表(17)、enable.rs 两张名单、管线 stage 内 restricted-shell 守卫对 cd/exec/./source/command 五名的认领。门
本地:lib 一致性钉 + 电池(构建槽排队中,结果补评论)。CI 按现行基线逐名裁定(canary 账本红为过渡性)。