Skip to content

feat(a1): preserve-root closure + chmod/chgrp/chown tr! + wiring plan - #1698

Closed
caomengxuan666 wants to merge 2 commits into
mainfrom
rust2/a1-wire-clean
Closed

caomengxuan666 wants to merge 2 commits into
mainfrom
rust2/a1-wire-clean

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Unpicks a58b901 into preserve-root closure (5 files, captain-accepted) and A1 residual (31 files, split out as patches). Adds 34 tr! keys for chmod/chgrp/chown. cargo lib 766/0, permission ctest 83/83, gate 128 GNU pass. DOCS/2.0-a1-wiring-plan.md has the six-step plan and wave order.

…+ floor-exemption root-cause fix

Preservation commit (wave4b lesson). Components:

1. preserve-root acceptance closure (verified this lane): default-option
   semantics overturned the handover assumption (GNU chmod/chgrp/chown
   default to NO preserve-root; refusal only on explicit
   --preserve-root, last-wins, per-operand ROOT_DEV_INO_CHECK) -
   aligned with a recorded platform safety floor (real native volume
   roots/refuse-pointing reparses refused even by default, GNU has no
   such spellings); legacy C++ alias diagnostics 41/47 byte-equal
   (three-way m4 matrix, 6 adjudicated platform/fixture cells, 0
   open); reparse-point identity via link_target_is_root (junction to
   volume root refused before traversal).
2. Floor-exemption root-cause fix: the cwd volume-root fallback must
   NOT count as a namespace root; exemption now applies only to the
   configured shell root (fsutil.rs + regression test
   native_floor_predicate). Incident: the pre-fix floor test passed
   real C:\ to product chmod -R 755 and walked it ~8 min as cmx
   (read-only attributes cleared on cmx-writable files; no content
   changes; disclosed in the lane report).
3. Pre-existing A1 wiring state from the earlier wire-phase-a1 lane
   (uncommitted, NOT accepted per checkpoint) - preserved as-is.

cargo test -p winux-cmds --lib: 715/0. Evidence:
rust2/target/preserve-root-accept/ (m1/m2/m2b/m4 matrices +
three-way TSV). A1 re-acceptance ready pending I18N lane + captain
rulings on (a) native-root floor divergence, (b) lchown-on-link
EOPNOTSUPP silent mapping.
…ng plan

- split a58b901: 5 files preserve-root closure (+1609/-307), 31 files A1 residual
- 34 tr! keys (chmod 10, chgrp 10, chown 14) with GNU inner wording
- cargo lib 766/0, permission ctest 83/83, gate 128 GNU pass
- DOCS/2.0-a1-wiring-plan.md: 82 tables/2679 rows, gaps, W5->W1->W2->W4 order
@caomengxuan666

Copy link
Copy Markdown
Member Author

Deferred: the a58b901 base conflicts broadly with batch-1/2 tr! on main. Re-dispatch on current main via Devin; the split patches (preserve-root closure / A1 residual) and the 34-key catalog patch remain on branch rust2/a1-wire-clean for reuse.

caomengxuan666 added a commit that referenced this pull request Nov 14, 2026
#1731)

* feat(rust2): replay preserve-root closure + chmod/chgrp/chown tr! on batch-2

Re-applies the accepted preserve-root closure hunks from a58b901's
unwind (PR #1698 split) onto current main, merged through batch-2's
i18n surface (#1683):

- argopt: flag_last; "--=v" reports ambiguous over the full table via
  ambiguous_option(); unrecognized long names keep the inline =value
  token via unrecognized_option()
- chmod/chgrp/chown: dash-mode grammar, DerefMachine, dot-spec,
  preserve-root refusal, EOPNOTSUPP silent mapping, -v link skip
- fsutil: shared lexical root recognition, native-root floor, display
  rules; orthogonal to main's literal_operand_path (#1283/#1332/#1333)
- permission-family messages migrate to 34 stable tr! keys
  (command.{chmod,chgrp,chown}.error.*) with named placeholders;
  usage_error(ctx, io, prog, msg) signature throughout

cargo test -p winux-cmds --lib: 889 passed / 0 failed.
Targeted suites: preserve 12/12, floor 2/2, dash 14/14, dot 3/3,
display 2/2, preserve_root 6/6; read-only sentinel assertions intact
(refused passes leave attributes/mtime/size untouched).

Generated with [Devin](https://devin.ai)

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

* gate(a1): permission-family rows — chmod 60 / chgrp 29 / chown 47

gen-cases.py +57 lines across chmod_rows/chown_rows/chgrp_rows
(WSL-probed values, unchanged from the #1698 review); regenerated
TSVs: chmod 45->60, chgrp 24->29, chown 37->47. All other 85 tables
re-emit byte-identical to main.

Corpus is now 88 tables / 3635 rows on this base (main added
cp/sed/find/xargs/grep/egrep/fgrep since the 82/2679 audit).

Generated with [Devin](https://devin.ai)

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

* docs(a1): wiring plan refresh, zh-CN catalog patch, split artifacts

- DOCS/2.0-a1-wiring-plan.md re-based to 38b3751: 88 tables/3635 rows,
  registry 88 / wired 53 / rust-ready 35 (egrep+fgrep ride grep's wire),
  CMake double-set() residue flagged for the next wire to collapse,
  batch-2 merge notes, W5->W1->W2->W4->W3 order preserved
- catalog/0001-zh-CN-chmod-chgrp-chown-tr.patch: 34 zh-CN keys +
  VERSION 0.6.35->0.6.36 against winuxcmd-i18n@cd9980d; targeted
  validate of the 34 en/zh pairs: valid. Not applied to the shared
  i18n checkout from this lane
- rust2/split/: preserve-root-closure.patch regenerated as the
  replayed 5-file increment on 38b3751 (closure + tr!, shared hunks);
  a1-wiring-residual.patch kept verbatim (base 68d2917) as the record
  of what was stripped

Generated with [Devin](https://devin.ai)

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

---------

Co-authored-by: Devin <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