Repository navigation
WIP: 1.5.0 row 8 — evaluation & write-back (WP-7) - #1890
Merged
Merged
Conversation
…list, serve-loop channel PLAN row 8 (WP-7), on master f898804: - src/debugger/evaluation.rs: the single owner of the evaluation power rules (design 5.3/7.4/7.5/7.6). Explicit = full power; implicit = AST whitelist only (check_implicit), rejections as section 6.3 diagnostics. Word-level classification walks expansion spans with the parser's own matched-pair discipline and the parser's own arithmetic operator scan. - StopLoopOutcome::Evaluate channel: the stop loop asks, the executor executes in the stopped frame and installs the EvaluationOutcome on the session; the stop is re-served. - Executor paths in trap_exec: single-expansion words go through the engine's own expand_word; command text executes through execute_ast under the funnel guard — write-back is the real assignment machinery, no debugger-private write channel. - Consult window: $BASH_COMMAND refreshes to the seam's frozen command text before the consult (design 7.3 ordering; closes 150-views REPORT section 5 note 1's one-command lag) and is restored on every exit. - Parser: arithmetic_operators / is_arithmetic_assignment_operator lifted to pub(crate) for the checker's reuse. Tests (scenario-7 battery) follow in the next commit.
- evaluation_tests: the whitelist/rejection correspondence
pinned one form at a time (every design 7.5 allowed form
admitted, every rejected form refused with its class and the
section 6.3 diagnostic shape); the section 8 scenario 7
fixture end to end — implicit reads of the stopped frame
(scalar/array/assoc/local/$1/$?/PIPESTATUS), rejected forms
provably never execute (the := target still reads its old
value next; the comsub's marker file never appears), explicit
full power (comsub executes, := lands), write-back through
the real assignment path (scalar/array element/local/set --
visible to the debuggee's own next command; readonly refused
with status 1; PIPESTATUS assignment transient as in GNU),
frame addressing, parse failure as a Parse diagnostic; the
extglob pathname class refused at a stop in an
extglob-enabled debuggee.
- Evaluation expands through expand_word_mut (the entry command
preparation uses): its := pre-scan is what makes an explicit
${x:=y} write land, exactly as in a real command word.
- consumer_tests act2: $BASH_COMMAND at the pipeline stop now
pins the aligned value — the stop's own frozen command text
(WP-7 consult refresh), replacing the lagging-read pin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PLAN row 8 (WP-7) on master
f8988042. Draft until the row-8 gates close; do not merge.Deliveries
src/debugger/evaluation.rs: fragment parsed by the engine's own parser; command-level AST answers structure; word-level expansion spans classified with the parser's own matched-pair discipline (skip_nested_expansion) and the parser's own arithmetic operator scan (lifted topub(crate), no second rule set anywhere). The parser probe behind this: per-word expansion inventories are deliberately empty for ordinary words in this engine — the checker works at the two levels the engine itself decomposes at (details in the cluster REPORT).check_implicit), rejections delivered as §6.3-shaped diagnostics (skipped and marked, never executed; exact message pinned).StopLoopOutcome::Evaluatechannel: the stop loop asks, the executor executes in the stopped frame and installs the outcome on the session, then re-serves the same stop. Single-expansion words expand via the engine'sexpand_word_mut(the entry command preparation uses,:=-pre-scan included); dynamic faces read through the engine's own dynamic getters (the row-6 views' sources).execute_astunder the funnel guard; no debugger-private write channel. Readonly refusal and PIPESTATUS transience pinned as the real path answers them.$BASH_COMMANDrefreshes to the seam's frozen command text for the consult window (design §7.3 ordering) and is restored on every exit; act2's pin updated to the aligned value.Gate evidence (local)
ownership_unary_operators_check_existing_file.RUSTFLAGSwith-D warningscargo check --lib: clean.3e6709c1run 40575768000 — Rust tests + macOS + shell + cross-targets + niu-canary (40575768206) SUCCESS; goldens red only at step 5upstream_suite_slice_snapshots(122/1, pre-existing [windows] exec fd 移动后读空:exec 10<infile; exec 0<&10; cat <&10 得 EOF(GNU 输出文件内容),Linux 面与 GNU 一致 #1887/[windows] history 多余参数退出码 1 应为 2:history 10 42 在 Windows 上返回 1(GNU 2),Linux 面一致 #1888), its lib step green. First-commit run 40573734372's red is fully accounted: the only failing test in the Linux/macOS/Windows-lib jobs was act2's pre-update lagging pin.upstream_suite_slice_snapshots(pre-existing, [windows] exec fd 移动后读空:exec 10<infile; exec 0<&10; cat <&10 得 EOF(GNU 输出文件内容),Linux 面与 GNU 一致 #1887/[windows] history 多余参数退出码 1 应为 2:history 10 42 在 Windows 上返回 1(GNU 2),Linux 面一致 #1888) — untouched, not re-recorded.Cluster REPORT:
~/workspace/rubash-150/clusters/150-row8/REPORT.md(per-item ledger, whitelist↔pin table, residuals).