Skip to content

docs(ledger): record Session::cwd - #3704

Merged
caomengxuan666 merged 2 commits into
masterfrom
docs/ledger-session-cwd
Nov 16, 2026
Merged

caomengxuan666 merged 2 commits into
masterfrom
docs/ledger-session-cwd

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

niubash#1020 (merge 2dd426c5) reads the session cwd in its spell-correct-word readline command (repl.rs:1953, spell_correct_path(&word, session().cwd())), but no census ever registered the face. The §5.5 Session-method census flags it as consumed-but-unrecorded, failing the niu-canary pairing job on master itself (run 43731710185) and on every rubash PR head.

Recorded per the census-backfill precedent (cf. Session::background_job_count, #2869): header addendum + §2.3 row (count 1, the face's single production call) + §6 method rubash::api::Session::cwd entry. §6 grows 287 → 288.

Verification (local, no build needed): python3 scripts/check-api-ledger.py --self-test passes; the coverage check against niubash master now reports all 288 ledger symbols present / all 97 consumed niubash paths are recorded, rc=0 (before this change it failed with exactly the one missing symbol).

The niubash copy is mirrored in a companion niu PR (same branch name, same content, byte-identical — the canary's cmp step enforces it). Per the lockstep precedent, the pairing job goes green once both land.

本 PR 删除了什么

无删除。纯增性 ledger 记录:新增一行 §6 条目、一行 §2.3 census 行、一段 header addendum;无产品代码改动。

UNVERIFIED-BY-CAPTAIN

niubash#1020 (merge 2dd426c5) reads the session cwd in its
spell-correct-word readline command (repl.rs:1953,
spell_correct_path(&word, session().cwd())), but no census
ever registered the face. The §5.5 Session-method census flags
it as consumed-but-unrecorded, failing the niu-canary pairing
job on master and on every rubash PR head.

Recorded per the census-backfill precedent: header addendum +
§2.3 row (count 1, the face's single production call) + §6
method rubash::api::Session::cwd entry. §6 grows 287 → 288.
The niubash copy is mirrored in the companion niu PR; the
pairing job goes green once both land (lockstep per the
background_job_count precedent).
@caomengxuan666

Copy link
Copy Markdown
Member Author

注记:用户新开 #3750(头 bc906d8)的 ledger 半面与本 PR 登记同一面(Session::cwd 的 §2.3 行 + §6 条目,同一插入点、行文不同)——已裁决:锁步对本 PR + niu #1021 不变,#3750 rebase 为只留 issue2875 诊断半面(裁决评论见 #3750,6901571479)。本 PR 不受影响,仍按原计划锁步合入;#3750 的诊断半面(consumer_tests.rs +11/−4)独立走复核。

caomengxuan666 added a commit that referenced this pull request Nov 15, 2026
…1021 lockstep pair

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 16, 2026 05:43
@caomengxuan666
caomengxuan666 merged commit 58eeb88 into master Nov 16, 2026
7 of 11 checks passed
caomengxuan666 added a commit to unixwin/niubash that referenced this pull request Nov 16, 2026
Mirrors the `Session::cwd` recording into this repo's copy of docs/api-ledger.md: header addendum, §2.3 row, and a §6 entry (287 → 288 symbols), byte-identical to the rubash copy. The host consumes this method (landed in #1020) and the ledger never recorded it, which reddened every rubash PR's niu-canary at the ledger coverage step.

Lockstep pair with unixwin/rubash#3704 (merged as 58eeb88c); with both halves landed, the two ledger copies agree again and the cross-repo ledger checks go green.

Docs only — this PR deletes no code.
caomengxuan666 added a commit that referenced this pull request Nov 16, 2026
…fixes (#3750)

* ci: record Session::cwd in api-ledger; surface issue2875 resolver diagnostics

Two pieces of master-CI repair:

- docs/api-ledger.md: niubash master calls Session::cwd
  (repl.rs spell-correct path, shell.borrow().session().cwd()) but
  the §5.5 census entry was never recorded — the 'niubash builds
  against this tree' check now fails census-missing. Record the face
  in §2.3 and the §6 symbol block.
- consumer_tests.rs issue2875_require_rubash_binary: the CI panic
  reports no diagnostics about which resolver arm fired or what
  current_exe was. Report CARGO_BIN_EXE_rubash, both arms, and the
  resolved path in the assert so the next failing run names the
  actual gap instead of only the precondition.

Refs #3605

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(test-resolver): accept the build/<pkg>/<fp>/out test-binary layout

CI's newer toolchain places the unit-test binary for a package with a
build script inside the package's own build-dir out dir
(target/debug/build/rubash/<fingerprint>/out/rubash-<fingerprint>), so
the deps-only gate in test_rubash_binary_from_current_exe returned
None and issue2875_input_procsub_child_runs_as_rubash_shell panicked
on every CI run while passing locally under the classic deps layout.

Accept 'out' alongside 'deps'; the ancestor walk already reaches
<target>/debug/rubash (which the workflow's cargo build --locked step
produces) from that layout, and a file literally named rubash[.exe]
still never matches inside it, so production fallback to current_exe
is unchanged.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test: fix masked out/-layout + stale-corpus failures under the issue2875 veil

The issue2875 panic ran nextest's fail-fast at test 23/1249, so two
pre-existing Linux CI failures were never observed:

- tests/{issue2043,issue2046}/fn rubash() resolved the bin target by
  popping twice off current_exe — correct only under the deps/ layout.
  Under the newer cargo build-dir layout (test binaries inside
  build/<pkg>/<fingerprint>/out/) the walk lands inside the fingerprint
  dir and spawn fails ENOENT. Anchor on env!("CARGO_BIN_EXE_rubash")
  instead, like the rest of the suite.

- corpus.json case sleep-fake kept its Replace-era expectation
  (rc=0, no FAKE line) after #3510 flipped the unix sleep face to
  ResolvablePolicy::Yield (user ruling 2026-11-14, rubash#3488). A
  yielding face spawns the PATH sleep, so the fake script runs —
  GNU shape. Relabelled registered->gnu per the command-sleep-fake
  precedent in the same file.

Refs #3605

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style: fmt-wrap issue2875 resolver diagnostics

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci: drop Session::cwd ledger record — adjudicated to the #3704 + niu#1021 lockstep pair

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test: flip issue2036 shape1 sleep pin to the yield/GNU shape

Same ruling as the corpus flip (rubash#3488 user ruling 2026-11-14,
#3510): the unix simple-command face yields every parseable sleep form
to a real spawn, so the PATH fake runs and prints FAKE-sleep — the GNU
shape (bash has no sleep builtin). The pin asserted the retired
Replace-era expectation 'fake sleep must not run'.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

1 participant