Skip to content

CTX-1822: chore(lua): bump phodopus to v0.2.0 (f3d6a9b) - #3152

Merged
Xuepoo merged 3 commits into
mainfrom
ctx-1822/chore-phodopus-v0-2-0
Nov 14, 2026
Merged

Xuepoo merged 3 commits into
mainfrom
ctx-1822/chore-phodopus-v0-2-0

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: area:plugins | Labels: chore, P1, area:plugins | Milestone: v0.1.0 | RFC: OQ-none | Task: CTX-1822

Closes #3151

Summary

  • Upgrade phodopus in crates/bitty-lua/Cargo.toml and Cargo.lock from 0.2.0-alpha.1 (91b8a2c) to 0.2.0 (f3d6a9b).
  • Add phodopus_v0_2_0_lua54_surface_in_sandboxed_vm in crates/bitty-lua/src/lib.rs to verify xpcall, rawequal, rawlen on strings, __metatable / __name, coroutine.wrap / coroutine.isyieldable, string.gsub function replacements, and exact i64/f64 comparisons and shifts inside the sandboxed VM.

Summary by CodeRabbit

  • Compatibility
    • Improved Lua 5.4 compatibility for error handling, metatables, coroutines, string replacement, numeric comparisons, and bit shifts, providing more consistent behavior across these language features.

@Xuepoo Xuepoo added this to the v0.1.0 milestone Nov 14, 2026
@Xuepoo Xuepoo added chore Chore / maintenance P1 Priority: high area:plugins labels Nov 14, 2026
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95b9c690-2855-43c4-a5a5-b7a1ca28e566
Commits

Reviewing files that changed from the base of the PR and between 528a52a and 9296bf4.

Files selected for processing: 3

  • crates/bitty-lua/README.md
  • packaging/freebsd/x11/bitty/Makefile
  • packaging/openbsd/x11/bitty/Makefile

No actionable comments were generated in the recent review.

Walkthrough

The Lua crate now pins phodopus to revision f3d6a9b. A sandboxed test checks Lua 5.4 operations and verifies successful execution.

Changes: Lua runtime dependency and surface

Layer / File(s) Summary
Pin phodopus and verify Lua surface
crates/bitty-lua/Cargo.toml, crates/bitty-lua/src/lib.rs
The phodopus Git revision changes from 91b8a2c to f3d6a9b. A sandboxed test checks Lua operations, including xpcall, raw operations, metatables, coroutines, string.gsub replacements, integer/float comparisons, and negative shifts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · previous review 528a5

This updates the Lua runtime dependency to the requested revision and adds a sandboxed test for several Lua 5.4 behaviors. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #3151 requires the phodopus pin to move from 0.2.0-alpha.1 (rev 91b8a2c) to 0.2.0 (rev f3d6a9b). The change summary shows crates/bitty-lua/Cargo.toml now pins rev f3d6a9b with version 0.2.0. Thi… Provide the resolved Cargo.lock entry for phodopus showing source revision f3d6a9b, or confirm the lock file was regenerated for this pin. Provide evidence that revision f3d6a9b contains the table float-key canonicalization, quota-pressure …
Passed Passed checks: 3 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: bumping the phodopus dependency to v0.2.0 at revision f3d6a9b in the bitty-lua crate. The raw summary confirms the Cargo.toml revision pin change. The title also names…
Out of Scope Changes check Passed The changes are limited to the phodopus pin in crates/bitty-lua/Cargo.toml and one added #[cfg(test)] test in crates/bitty-lua/src/lib.rs. The manifest change is the requested dependency bump under #3…
Full details: Title check

Explanation

The title names the main change: bumping the phodopus dependency to v0.2.0 at revision f3d6a9b in the bitty-lua crate. The raw summary confirms the Cargo.toml revision pin change. The title also names a ticket prefix (CTX-1822) and a conventional-commit type (chore(lua)), which are acceptable. The PR also adds a Lua 5.4 surface test, which the title does not mention, but that addition is secondary to the dependency bump and does not make the title misleading. The title is 55 characters and fits the concise-title guidance.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the phodopus pin in crates/bitty-lua/Cargo.toml and one added #[cfg(test)] test in crates/bitty-lua/src/lib.rs. The manifest change is the requested dependency bump under #3151. The test checks Lua 5.4 standard-library and comparison behaviors named in #3151. It adds no public API changes. No unrelated code changes appear in the summary. The Cargo.lock change is excluded from review and is not assessed here.

Full details: Linked Issues check

Explanation

Issue #3151 requires the phodopus pin to move from 0.2.0-alpha.1 (rev 91b8a2c) to 0.2.0 (rev f3d6a9b). The change summary shows crates/bitty-lua/Cargo.toml now pins rev f3d6a9b with version 0.2.0. This meets the manifest part of the requirement. The Cargo.lock part cannot be checked. Cargo.lock matches the ignored rule '!**/*.lock' and is excluded from review. The issue also lists behaviors that come from the dependency: i64/f64 comparisons and negative shifts, table float-key 2.0^63 canonicalization, quota-pressure collection in Lua::finish and Lua::execute_with_fuel, pattern backreferences %1..%9, and string.gmatch with math.mininteger init. The added test phodopus_v0_2_0_lua54_surface_in_sandboxed_vm covers xpcall, rawequal, rawlen on strings, __metatable/__name, coroutine.wrap/isyieldable, string.gsub function replacements, and i64/f64 comparisons and shifts. No in-repository test or code covers table float-key canonicalization, quota-pressure collection, pattern backreferences, or gmatch mininteger init. The contents of rev f3d6a9b were not available for inspection, so these behaviors cannot be confirmed.

Resolution

Provide the resolved Cargo.lock entry for phodopus showing source revision f3d6a9b, or confirm the lock file was regenerated for this pin. Provide evidence that revision f3d6a9b contains the table float-key canonicalization, quota-pressure collection, pattern backreference, and string.gmatch mininteger init fixes. Either supply that evidence or add sandboxed-VM test coverage for those behaviors.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: abf6d3bf-2974-4834-b9c7-a1abfe0e6cb8
Commits

Reviewing files that changed from the base of the PR and between 524cc69 and 528a52a.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 2

  • crates/bitty-lua/Cargo.toml
  • crates/bitty-lua/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #3152 review — chore(lua): bump phodopus to v0.2.0 (f3d6a9b)

  • Repo: bitty-terminal/bitty, branch ctx-1822/chore-phodopus-v0-2-0
  • Head: 528a52af66bb092b5fd403dfcee5fa809ea07f5a (single commit 528a52af)
  • Merge base with origin/main: 524cc691af102de6074adb773c47055990f51f72
  • Diff: 3 files, +62/−5 (Cargo.lock 8, crates/bitty-lua/Cargo.toml 1, crates/bitty-lua/src/lib.rs +57)
  • CI at review time: 16 pass / 1 pending (Windows check and test) / 0 fail / 2 skip. The Windows leg was still running; this is not treated as green. All local commands below ran on Linux only.
  • Toolchain used locally: cargo 1.85.1 (MSRV leg) and rustc 1.98.1 (default leg); target dir /tmp/hermes/pr3152-check/*; lane worktree untouched (git status clean before and after).

1. Dependency edge — PASS

Manifest and lock move together to tag v0.2.0 = f3d6a9b8ecdf829629daa688a4adbe08259b1b81:

  • crates/bitty-lua/Cargo.toml:17 — phodopus = { version = "0.2.0", git = "https://github.com/bitty-terminal/phodopus", rev = "f3d6a9b" } (was version = "0.2.0-alpha.1", rev = "91b8a2c").
  • Cargo.lock:2265-2267 — name = "phodopus", version = "0.2.0", source = "git+https://github.com/bitty-terminal/phodopus?rev=f3d6a9b#f3d6a9b8ecdf829629daa688a4adbe08259b1b81" (was 0.2.0-alpha.1 @ rev=91b8a2c).

Tag→commit verified independently in the sibling checkout /mnt/data/Workspace/Projects/bitty-terminal/phodopus:

$ git rev-list -n1 v0.2.0
f3d6a9b8ecdf829629daa688a4adbe08259b1b81
$ git show v0.2.0:Cargo.toml | grep version   # workspace package version
version = "0.2.0"

git diff origin/main...HEAD -- Cargo.lock is exactly 3 hunks and every changed line is a phodopus line:

hunk line change
1 Cargo.lock:2266-2267 phodopus version + source rev
2 Cargo.lock:2283 phodopus-gc-arena source rev only (version stays 0.5.3)
3 Cargo.lock:2294 phodopus-gc-arena-derive source rev only (version stays 0.5.3)

No other package entry changes, no dependency list reshuffle, no checksum/registry churn. The two gc-arena-family crates are part of the same git workspace as phodopus, so their source-only move is expected and correct.

2. Lock integrity — PASS (with one environment caveat, reported verbatim)

The literal command from the check failed on a cold local git cache, not on lock content:

$ CARGO_TARGET_DIR=/tmp/hermes/pr3152-check/target cargo check -p bitty-lua --tests --offline
error: failed to get `phodopus` as a dependency of package `bitty-lua v0.0.41 (...)`
Caused by: failed to load source for dependency `phodopus`
Caused by: unable to update https://github.com/bitty-terminal/phodopus?rev=f3d6a9b#f3d6a9b8
Caused by: can't checkout from 'https://github.com/bitty-terminal/phodopus': you are in the offline mode (--offline)

Diagnosis: the object f3d6a9b8ecdf... is present in the cargo git db (~/.local/share/cargo/git/db/phodopus-5cc4dd05d7e0a5cf, git cat-file -t → commit), but cargo still wants a fetch to record the rev ref in that db, which --offline forbids. git ls-remote confirms upstream main HEAD is f3d6a9b8ecdf..., i.e. the pin is a real, reachable, main-line commit.

Lock completeness proven with --locked, which fails if Cargo.toml and Cargo.lock disagree:

$ cp Cargo.lock /tmp/hermes/pr3152-lock-before
$ cargo check -p bitty-lua --tests --locked
   Checking phodopus-gc-arena v0.5.3 (https://github.com/bitty-terminal/phodopus?rev=f3d6a9b#f3d6a9b8)
   Checking phodopus v0.2.0 (https://github.com/bitty-terminal/phodopus?rev=f3d6a9b#f3d6a9b8)
   Checking bitty-lua v0.0.41 (...)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.11s
EXIT=0
$ diff -q /tmp/hermes/pr3152-lock-before Cargo.lock
Cargo.lock NOT modified

So the lock is complete for the new edge and cargo does not want to rewrite it. Caveat for the parent: --offline as specified only works once the rev has been checked out once; on a fresh runner the stated command fails for cache reasons, not lock reasons.

3. The +57 lines in crates/bitty-lua/src/lib.rs — PASS (premise corrected)

The premise of the check is wrong: there is no API/behaviour adaptation at all. All 57 added lines are inside the test module — crates/bitty-lua/src/lib.rs:2193-2195 gates it (#[cfg(test)] #[allow(deprecated)] mod vm_unit_tests { … }), and the addition is one new test, phodopus_v0_2_0_lua54_surface_in_sandboxed_vm (lib.rs:2633 → lib.rs:2686), ending with assert_eq!(vm.test_global("verified"), Some(1.0)) and closing the module. No production type, signature, or budget path is touched.

  • Forced by the bump? No. v0.2.0 compiles against bitty-lua unmodified — cargo check --locked is clean with zero source edits, so the bump forces no sourcing change.
  • Enabled by the bump? Yes, per upstream CHANGELOG [0.2.0] - 2026-11-14 in the phodopus repo: xpcall(f, msgh, ...), rawequal, __metatable/getmetatable protection, rawlen on strings, __name in tostring, coroutine.wrap/coroutine.isyieldable, string.gsub function replacement (ReplMode::Function), byte-oriented patterns, and Lua 5.4 integer/float + negative-shift semantics. The test asserts exactly that set — it is a behaviour pin for the bump, not feature creep.
  • Is the test real (not vacuous)? It passes on the new pin: cargo test -p bitty-lua --lib phodopus_v0_2_0 → 1 passed; 0 failed; 279 filtered out. Independent corroboration that these behaviours did not exist at the old pin: bitty-plugins/plugins/bar/lua/bar/init.lua:1378 documents "the phodopus production VM rejects string.gsub with a function replacement" and hand-rolls a string.find/string.sub workaround, pinned by bitty-plugins/plugins/bar/tests/bar.test.ts:746. I did not run a mutation test (revert rev → expect failure) because that requires a mutated copy; the failure-at-old-rev claim rests on the upstream changelog plus that plugin workaround, not on an executed run.
  • Reachable from production? The diff adds no production-reachable code (test-only). The Lua surface it exercises is production-reachable through the existing path: LuaVm::execute (lib.rs:2174) called from crates/bitty-lua/src/host.rs:9610 (self.execute(code)?), with VMs built only through the gate (crates/bitty-lua/src/gate.rs:174-181 build_config_vm / LuaVm::with_config_budgets), consumed by crates/bitty-config/src/file.rs:1407. So the behaviour is production-relevant; the new lines are not.

Minor nit (non-blocking): the test's VM id "xuepoo.phodopus-v0-2-0" (lib.rs:2637) is an opaque placeholder name; something like "bitty.phodopus-v0-2-0" would read better.

4. Version-pin policy ("one place per repo") — FAIL

Exactly one manifest pin exists (crates/bitty-lua/Cargo.toml:17; no phodopus reference in flake.nix, justfile, or .github/workflows/ — grep empty). But the repo-wide rule is broken by three things this PR leaves behind, two of which were consistent with main before the bump and are now stale:

  1. packaging/freebsd/x11/bitty/Makefile:501 — still
    phodopus,phodopus-gc-arena,phodopus-gc-arena-derive@git+https://github.com/bitty-terminal/phodopus?rev=91b8a2c#91b8a2ceb77994aeaf3f8485862a400671bbed5e
  2. packaging/openbsd/x11/bitty/Makefile:483 — same stale rev=91b8a2c string.
    Both files were touched by the immediately preceding release PR (08e077b2, CTX-1819/#3148) and carry the live PORTVERSION=0.0.41 (packaging/freebsd/x11/bitty/Makefile:17), so they are maintained, not dead weight. Their CARGO_CRATES distfile list no longer matches Cargo.lock, which now demands ?rev=f3d6a9b; that is a vendored/offline port build break, and it is introduced by omission in this PR.
  3. crates/bitty-lua/README.md:11 states "per Cargo.toml, exact git revision f6aa59a16c0dd8d3f65f54043f8c3c2fe02b5344", repeated at :24 and :26, :267 (phodopus@f6aa59a). This was already stale on main (which pinned 91b8a2c), and this PR changes the very manifest the README claims to mirror without updating it.

No gate catches any of it: scripts/check-extension-pins.sh:11 explicitly declares "phodopus is a library dependency, not an extracted extension, and stays out of this policy" (its fixture at scripts/tests/check-extension-pins.test.sh:63 uses f6aa59a only as synthetic input).

Fix is two packaging lines plus the README revision strings.

5. Extension/consumer impact — REPORT (no split created here; one split widened)

  • bitty-ai/Cargo.lock:1019 pins phodopus at git+...?rev=f6aa59a#f6aa59a16c0dd8d3f65f54043f8c3c2fe02b5344 — i.e. bitty-ai is already behind main (91b8a2c), not merely behind this PR. After the bump: bitty @ 0.2.0/f3d6a9b vs bitty-ai @ f6aa59a. Different lockfiles (separate workspace, its own deny.toml:53-57 git-source allowlist), so no build breakage in this repo — but an extension host and the terminal would run two different Lua VMs. This bump widens an existing split, it does not create one; catching bitty-ai up is a separate task, and no edit was made to that sibling.
  • bitty-ai/crates/bitty-ai-slice/README.md:81 only notes the transitive bitty-lua/phodopus git dependency — no pin.
  • bitty-plugin-sdk: zero phodopus references (grep empty) — no SDK or template impact. bitty-plugins/template/bitty-plugin-template/README.md:130 mentions the VM only in prose ("targets the Lua 5.4 language"), which stays true.
  • bitty-plugins: prose/comment mentions only, no pins. Behaviourally interesting: plugins/bar/lua/bar/init.lua:1378-1385 works around the old lack of gsub function replacements; v0.2.0 makes that workaround unnecessary but not wrong, and plugins/bar/tests/bar.test.ts:746 (asserts bar's own code contains no gsub-with-function) still passes. No consumer break detected.

6. MSRV 1.85 — PASS

$ cargo +1.85 --version
cargo 1.85.1 (d73d2caf9 2024-12-31)
$ CARGO_TARGET_DIR=/tmp/hermes/pr3152-check/target-msrv cargo +1.85 check -p bitty-lua --tests --offline
   Checking phodopus v0.2.0 (https://github.com/bitty-terminal/phodopus?rev=f3d6a9b#f3d6a9b8)
   Checking bitty-lua v0.0.41 (...)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.61s
MSRV_EXIT=0

No E0658. The diff contains no Rust source change at all, and grepping the added lines for let … &&, if let … &&, let … && let returns nothing — no let-chains or if let guards introduced.

7. Clippy — PASS

$ CARGO_TARGET_DIR=/tmp/hermes/pr3152-check/target cargo clippy -p bitty-lua --all-targets --offline -- -D warnings
    Checking bitty-lua v0.0.41 (...)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.09s
CLIPPY_EXIT=0

Zero warnings, so -D warnings had nothing to promote.

8. Hygiene — PASS (one nit)

  • All added comments and the test body are English; no non-ASCII, no CJK.
  • grep '^+' over the added lines for dbg!, println!, eprintln!, /home/, /mnt/, C:\ → NO_HYGIENE_HITS.
  • No new #[allow]: the only one in scope, crates/bitty-lua/src/lib.rs:2194 #[allow(deprecated)] on the test module, predates the PR and is explained by the deprecated raw constructors kept for the gate path (crates/bitty-lua/README.md:33-36).
  • Nit: placeholder VM id "xuepoo.phodopus-v0-2-0" (lib.rs:2637) — see check 3.

9. Docs — REPORT (no ADR drift; older live-pin claims elsewhere)

  • bitty-docs/docs/decisions/adrs/ADR-0012-phodopus-runtime.md: no revision pin at all (grep for 91b8a2c|f6aa59a|f3d6a9b|0.2.0|alpha finds no pin, only prose). No drift from this PR.
  • bitty-docs/docs/security/evidence-matrix.md:58 ("pins phodopus at 91b8a2c"), docs/security/risk-register.md:93-94, docs/roadmap/now-next-later.md:370 all anchor that rev to commit 27807ef0 — historically true and immutable, so they are dated evidence rather than live pins. Worth a docs note only because the open F-3 re-review (docs/security/evidence-matrix.md:249) is now scoped to a pin that moved again (f3d6a9b), which changes what the auditor must re-verify.
  • Genuine pre-existing drift left in place: bitty-plugins-docs/runtime/plugin-host-runtime-rfc.md:33 — "pins Phodopus 0.2.0-alpha.1 at f6aa59a" (stale against main's 91b8a2c before this PR, more so after). Report only; that repo is out of this PR's scope.

Blocking items

  1. packaging/freebsd/x11/bitty/Makefile:501 and packaging/openbsd/x11/bitty/Makefile:483 still pin phodopus at 91b8a2c; Cargo.lock now demands f3d6a9b. Update both CARGO_CRATES entries (and their distfile checksums) or state explicitly why the port recipes track a different rev. No gate covers this (scripts/check-extension-pins.sh:11 excludes phodopus).
  2. crates/bitty-lua/README.md:11,24,26,267 claim "exact git revision f6aa59a… per Cargo.toml" in the crate whose manifest this PR changes — update to f3d6a9b.

Everything else is green: edge + lock move, --locked check, MSRV 1.85, clippy -D warnings, hygiene, and the new regression test (which is test-only, so the bump needs no source adaptation). The Windows CI leg was still pending at review time and is not counted as passing.

VERDICT: CHANGES-REQUESTED

…s to v0.2.0 (f3d6a9b)

Review of PR #3152 found the bump to phodopus v0.2.0 (f3d6a9b) only reached crates/bitty-lua/Cargo.toml and Cargo.lock, leaving stale duplicate pins in the BSD port distfile lists and the crate README.

- packaging/freebsd, packaging/openbsd: phodopus{,gc-arena,gc-arena-derive} rev 91b8a2c and its full sha move to f3d6a9b / f3d6a9b8ecdf829629daa688a4adbe08259b1b81, escaped hash kept.
- crates/bitty-lua/README.md: revision and version claims now match the manifest pin (0.2.0 at f3d6a9b), and the stdlib baseline bullet names the v0.2.0 additions the bump actually brings.

Verified with cargo check -p bitty-lua --tests --locked --offline.

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #3152 — round-2 delta re-review

Repo: bitty-terminal/bitty · Branch: ctx-1822/chore-phodopus-v0-2-0 · Base: main
Round-1 head: 528a52af (CHANGES-REQUESTED) · Delta head: 23e93ae55188ca7708984c2b16243f67da0025bd
Delta scope: crates/bitty-lua/README.md, packaging/freebsd/x11/bitty/Makefile, packaging/openbsd/x11/bitty/Makefile
PR commits: 528a52af (bump), 23e93ae5 (this fix) — merge-base with main: 524cc691


1. Completeness — PASS

git grep -n -E '91b8a2c|f6aa59a|0\.2\.0-alpha\.1' 23e93ae5 -- packaging/ crates/bitty-lua/ → no hits (exit 1). Every stale pin in the requested paths is gone; no historical prose naming an old revision remains (all three README mentions now read f3d6a9b).

Repo-wide grep for the same pattern yields exactly one hit, classified:

Hit Classification
scripts/tests/check-extension-pins.test.sh:63 — phodopus = { version = "0.2.0-alpha.1", ..., rev = "f6aa59a" } Not a live pin. This is the body of write_manifest(), a synthetic manifest the fixture writes into $tmp/cargo/... to prove the drift checker treats phodopus as a library pin and stays out of the extracted-extension policy (see the comment at lines 56–58). It is deliberately stale fixture input, outside the two required paths, and the real Extension pin drift CI job passes on this head (18s). No action needed.

Live phodopus references at 23e93ae5 are only: packaging/freebsd/x11/bitty/Makefile:501, packaging/openbsd/x11/bitty/Makefile:483, crates/bitty-lua/Cargo.toml:17, Cargo.lock:2267/2283/2294.

2. Consistency of the BSD pins — PASS

Both port Makefiles now carry (cat -A, tab shown as ^I):

^Iphodopus,phodopus-gc-arena,phodopus-gc-arena-derive@git+https://github.com/bitty-terminal/phodopus?rev=f3d6a9b\\#f3d6a9b8ecdf829629daa688a4adbe08259b1b81
  • Short rev f3d6a9b and full sha f3d6a9b8ecdf829629daa688a4adbe08259b1b81 match crates/bitty-lua/Cargo.toml:17 (version = "0.2.0", rev = "f3d6a9b") and all three lock sources (Cargo.lock:2267, :2283, :2294 — phodopus 0.2.0, gc-arena 0.5.3, gc-arena-derive 0.5.3).
  • Escaping preserved: the hash is written \\# in the file (literal backslash + #), byte-identical to the sibling convention on the immediately preceding lines — e.g. freebsd bitty-storage@…?rev=7bf5177\\#7bf5177c668… and openbsd same. Indent is a leading tab, and the phodopus entry remains the terminal list item with no trailing \ continuation, exactly as before the edit.
  • Line placement is unchanged (freebsd 501, openbsd 483); only the two rev/sha tokens moved.

3. README truthfulness — FAIL (one unexercised claim)

Cited test exists at the cited location: crates/bitty-lua/src/lib.rs:2634 phodopus_v0_2_0_lua54_surface_in_sandboxed_vm (added by 528a52af, untouched by this delta). Claim-by-claim against its assertions:

README claim (README.md lines) Test evidence Status
crate version 0.2.0, rev f3d6a9b8ec… (11–12, 24–26, 27, 273) Cargo.toml:17, Cargo.lock:2267 supported
xpcall message handler with forwarded arguments (33–34) 2637–2643: xpcall(fn, handler, 20, 22) → msg == "handled:boom:42" supported
coroutine.wrap / coroutine.isyieldable (34–35) 2659–2667: isyieldable false at top level, true inside, wrap resume/yield chain 11, 15 supported
function replacements in string.gsub (35) 2669–2673: function replacement → "a=2 b=44", n == 2 supported
%1-%9 backreferences in string.gsub (35–36) no assertion anywhere — the only gsub call in the test (2670) passes a function, not a %1 replacement string; no other %1-%9 replacement appears in crates/ (git grep -E 'gsub\([^)]*"%[1-9]' → empty; the two other gsub tests use "b" and "" replacements) NOT exercised
exact Lua 5.4 integer/float comparison + negative shifts (36–37, 2675–2679) max_i ~= 9223372036854775808.0, max_i < 9223372036854775808.0, (16 << -2) == 4, (4 >> -2) == 16 supported

The parenthetical "(pinned by phodopus_v0_2_0_lua54_surface_in_sandboxed_vm in src/lib.rs)" therefore over-claims: one of the four listed v0.2.0 behaviors has no coverage. This is the same defect class round 1 raised (durable docs asserting state the tree does not back), reintroduced in the replacement wording, so it blocks.

Required fix (either, one line):

  • add the missing assertion to the test, e.g.
    assert(string.gsub("hello world", "(%w+) (%w+)", "%2 %1") == "world hello"); or
  • drop "and %1-%9 backreferences" from README.md:35–36 and stop attributing it to that test.

Secondary nit (non-blocking, no change required for this PR): the test is titled …in_sandboxed_vm but constructs via the deprecated raw LuaVm::new (lib.rs:2635, 959–966), not gate::build_plugin_vm. The README only cites the test name, so nothing is falsely claimed, but the name slightly oversells what the harness covers.

4. Scope — PASS

git diff 528a52af..23e93ae5 --stat → 3 files, +14/−8:
crates/bitty-lua/README.md (18), packaging/freebsd/x11/bitty/Makefile (2), packaging/openbsd/x11/bitty/Makefile (2). No stray files, no formatting churn.
git log -1 --format=%s 23e93ae5 = [CTX-1822] fix(packaging,docs): move BSD port and README phodopus pins to v0.2.0 (f3d6a9b) — begins with [CTX-1822], and the body explains the round-1 finding and the --locked --offline check it ran.

5. No regression to round-1 PASS items — PASS (verified by absence, not re-derived)

git diff --name-only 528a52af..23e93ae5 -- Cargo.toml Cargo.lock crates/bitty-lua/Cargo.toml → empty. The delta touches neither the manifest nor the lock, so round-1's lock-integrity findings (single 0.2.0 phodopus pin, three consistent git+…?rev=f3d6a9b#f3d6a9b8ec… sources, no version skew between gc-arena 0.5.3 and the manifest) still hold unchanged on this head. README pin text now agrees with them, which removes round-1's mismatch rather than creating a new one.

6. CI / Windows note — informational

gh pr checks 3152 --json bucket → {"pass":4,"pending":11,"skipping":4} — 0 failures.

  • pass: Extension pin drift (18s), AUR source build (54s), Linux X11 compat matrix (1m12s), MSRV 1.85 check (1m8s), Supply chain (deny/audit) (25s), Analyze (actions), VM tier (PR).
  • pending (still running after the restart on the new head): Windows check and test, macOS ARM64 check and test, Linux Wayland, Linux Wayland compat matrix, Linux X11 (xvfb), Quality gates (1)/(2), Analyze (rust).
  • skipping: CodeQL, CodeRabbit, VM tier (main), VM tier (nightly ARM64).

Branch state: mergeable: MERGEABLE, mergeStateStatus: BEHIND. Main is at f85aef31 (#3150 squash, [CTX-1821] fix(runtime): keep the controller predecessor pair…); compare API reports behind_by: 2, ahead_by: 1, diverged. So yes — update-branch (or the merge queue) is required before merge, and the Windows job has not yet reported; it must go green post-rebase because the bump touches a git dependency and the lock.


Summary

Round-1's three stale-pin sites are fixed correctly: BSD port distfile lists now carry the exact v0.2.0 rev with the escaped-hash convention intact and byte-consistent with sibling pins, and every README revision reference moved to f3d6a9b. Scope is clean and the manifest/lock are untouched, so lock integrity stands. One item remains: the rewritten stdlib bullet credits phodopus_v0_2_0_lua54_surface_in_sandboxed_vm with pinning %1-%9 string.gsub backreferences that the test never exercises — a one-line fix in either the test or the prose.

VERDICT: CHANGES-REQUESTED

…om the 0.2.0 note

Round-2 review: no test exercises %1-%9 gsub backreferences, so the README must not claim them (evidence-over-claims). The function-replacement clause stays; it is asserted by phodopus_v0_2_0_lua54_surface_in_sandboxed_vm.

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round-3 delta verification (guard) — PR #3152

This is a guard delta verification, not a new independent review. The independent
round-1 review (head 528a52af) posted CHANGES-REQUESTED for stale duplicate
phodopus pins; the independent round-2 review (head 23e93ae5) posted
CHANGES-REQUESTED for one unverified README claim (%1-%9 gsub backreferences
with no exercising assertion).

Delta under verification — 9296bf49 ([CTX-1822] docs(lua): drop the unverified gsub backreference claim from the 0.2.0 note):

  • git show --stat 9296bf49 → 1 file, +2/−3, crates/bitty-lua/README.md only.
    The diff deletes the %1-%9 backreference clause and keeps the
    function-replacement clause, which round 2 confirmed is asserted by
    phodopus_v0_2_0_lua54_surface_in_sandboxed_vm (crates/bitty-lua/src/lib.rs).
  • No Rust source, manifest, lock or packaging file is touched, so every round-1 and
    round-2 PASS (pin consistency in crates/bitty-lua/Cargo.toml, three Cargo.lock
    source lines, FreeBSD:501 / OpenBSD:483 escaped-hash form) still holds on this head.
  • git grep -E '91b8a2c|f6aa59a|0\.2\.0-alpha\.1' over packaging/ and
    crates/bitty-lua/ at 9296bf49 → no hits.
  • CI on head 9296bf49: 18 pass / 0 fail / 0 pending / 3 skipped, including
    Quality gates (1)+(2), Windows, macOS ARM64, Linux X11 and Wayland, MSRV 1.85,
    Supply chain, CodeQL.

Remaining non-blocking findings carried from rounds 1-2 (not addressed here, both
out of scope for this PR): bitty-ai/Cargo.lock is still at the older phodopus rev
(f6aa59a), and bitty-plugins-docs/runtime/plugin-host-runtime-rfc.md:33 still
names 0.2.0-alpha.1 @ f6aa59a.

VERDICT: APPROVE (round-2 blocker removed; doc-only delta)

@Xuepoo
Xuepoo merged commit 08199ed into main Nov 14, 2026
21 checks passed
@Xuepoo
Xuepoo deleted the ctx-1822/chore-phodopus-v0-2-0 branch November 14, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugins chore Chore / maintenance P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(lua): bump phodopus dependency to v0.2.0 (f3d6a9b)

1 participant