[{"id":"12711349219","type":"PullRequestReviewEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":794246559,"name":"bemanproject/exemplar","url":"https://api.github.com/repos/bemanproject/exemplar"},"payload":{"review":{"id":4846679659,"node_id":"PRR_kwDOL1c9n88AAAABIOJ2aw","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"200b556f25d7528580b08a39134b2410509f112d","state":"approved","html_url":"https://github.com/bemanproject/exemplar/pull/389#pullrequestreview-4846679659","pull_request_url":"https://api.github.com/repos/bemanproject/exemplar/pulls/389","_links":{"html":{"href":"https://github.com/bemanproject/exemplar/pull/389#pullrequestreview-4846679659"},"pull_request":{"href":"https://api.github.com/repos/bemanproject/exemplar/pulls/389"}},"submitted_at":"2026-08-03T17:02:05Z","updated_at":"2026-08-04T18:00:17Z"},"pull_request":{"url":"https://api.github.com/repos/bemanproject/exemplar/pulls/389","id":3627169149,"number":389,"head":{"ref":"388-windows-users-cannot-run-stampsh-without-wsl","sha":"200b556f25d7528580b08a39134b2410509f112d","repo":{"id":1155235973,"url":"https://api.github.com/repos/AndreiDurlea/exemplar","name":"exemplar"}},"base":{"ref":"main","sha":"32b69bd5846676013a204ce3c3fcbd6c074ea701","repo":{"id":794246559,"url":"https://api.github.com/repos/bemanproject/exemplar","name":"exemplar"}}},"action":"created"},"public":true,"created_at":"2026-08-03T17:02:07Z","org":{"id":168566813,"login":"bemanproject","gravatar_id":"","url":"https://api.github.com/orgs/bemanproject","avatar_url":"https://avatars.githubusercontent.com/u/168566813?"}},{"id":"12641044818","type":"PullRequestEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"merged","number":61,"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","id":4173942576,"number":61,"head":{"ref":"begin-demo-picker-and-graph-polish","sha":"679e02954d530330f0909dc313434cc30119969a","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"main","sha":"73dbda8677a1629cc9a49d1c18ed5836c859d1e6","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}}},"public":true,"created_at":"2026-08-01T22:15:46Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12640256402","type":"PullRequestEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"merged","number":63,"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/63","id":4178788045,"number":63,"head":{"ref":"adam-lang-round-float-builtin","sha":"5afe50c49a7ba0bc2810fd74b686f81b5b4b88ff","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"begin-demo-picker-and-graph-polish","sha":"cc9a3043b74dbf45f244bf64f23067155c45e06c","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}}},"public":true,"created_at":"2026-08-01T21:30:43Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12608107807","type":"IssueCommentEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/63","repository_url":"https://api.github.com/repos/stlab/cel-rs","labels_url":"https://api.github.com/repos/stlab/cel-rs/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/stlab/cel-rs/issues/63/comments","events_url":"https://api.github.com/repos/stlab/cel-rs/issues/63/events","html_url":"https://github.com/stlab/cel-rs/pull/63","id":5030870643,"node_id":"PR_kwDON4qS5c75Ez7N","number":63,"title":"cel-parser: add `as` cast operator and `round(f64)->f64`; make image_resize.adm2's pixel cells i32","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":11,"created_at":"2026-07-31T15:11:06Z","updated_at":"2026-08-01T21:31:02Z","closed_at":"2026-08-01T21:30:43Z","assignee":null,"issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/63","html_url":"https://github.com/stlab/cel-rs/pull/63","diff_url":"https://github.com/stlab/cel-rs/pull/63.diff","patch_url":"https://github.com/stlab/cel-rs/pull/63.patch","merged_at":"2026-08-01T21:30:43Z"},"body":"**Stacked on #61** - this branch's base is `begin-demo-picker-and-graph-polish`, not `main`, since it modifies `image_resize.adm2` which #61 introduces. Should merge after #61.\n\n## Summary\n\nWhile reviewing #61, it was pointed out that `image_resize.adm2`'s `orig_width`/`orig_height`/`width_px`/`height_px` were `f64` even though pixel counts are inherently whole numbers. They were `f64` because they're reciprocally related to `width_in`/`dpi` (`width_px = width_in × dpi`), and that arithmetic is inherently floating-point - but there was no way to *narrow* the float result back to a real integer, because:\n\n- `adam-lang`'s arithmetic operators are strictly homogeneous (checked via `cel-parser`'s type checker and operand-type tables) - no `i32 * f64`, no implicit coercion.\n- Function calls in this grammar aren't resolved through the static builtin-operator table at all - they're two chained scope lookups (an arity-0 lookup for the callee name, then an arity-`N+1` lookup for `\"()\"` with the callee and args already on the stack). Nothing in the codebase used this mechanism productively yet (only tests demonstrated the pattern), so there was no way to write a rounding/cast expression, period.\n\nThis adds:\n\n- **`round(f64) -> f64`** - rounds to nearest, halfway away from zero, matching `f64::round` exactly. Registered in `OpLookup::new()`, so it's available everywhere `cel-parser` is used.\n- **A general `as` cast operator** (`expr as Type`), covering every conversion Rust's own `as` supports among the built-in types this language recognizes: all 12 integer widths (checked, via `TryFrom`), int -> float (infallible) and float -> int (checked: `Err` on non-finite/out-of-range, truncates toward zero otherwise, matching Rust), `f32 <-> f64`, `bool -> <any integer>` (infallible, matching Rust exactly), and identity casts for `bool`/`String`. This replaces the originally-planned standalone `float()` builtin - narrowing/widening is now `round(x) as i32` / `x as f64` uniformly, per review feedback to follow Rust's own conversion semantics instead of a bespoke pair of functions.\n- `image_resize.adm2` updated: `orig_width`/`orig_height`/`width_px`/`height_px` are now genuinely `i32`; every method crossing the `i32`/`f64` boundary explicitly converts via `round(width_in * dpi) as i32` / `width_px as f64`.\n\n## Design notes\n\n- Each builtin is one scope function handling *both* halves of the call (the callee-name lookup and the `\"()\"` lookup), matching the only existing precedent for this mechanism (`cel-parser/src/lib.rs`'s `call_single_arg`-style tests). Each `\"()\"` handler peeks the stack to confirm the callee is *its own* marker type before consuming anything, rather than assuming it's the only registered arity-matching callable - there's no other caller of this mechanism today, but the peek-first design means that stays correct if one is ever added.\n- The narrowing cast's fallibility (not `round`'s - `round` is `f64 -> f64` and always succeeds) is a deliberate choice, not an oversight: this project's own conventions require checked arithmetic over silent wrapping/saturating elsewhere, and a silently-saturated pixel count would be exactly the kind of silent wrong answer that convention exists to avoid.\n\n## Test plan\n\n- [x] Unit tests in `cel-parser` covering `round` dispatch, the full `as` cast matrix (int<->int, int<->float, f32<->f64, bool->int, bool/String identity, and every rejected combination), composition of `round`+cast for the image_resize pattern, and out-of-range/non-finite error cases\n- [x] Full workspace `cargo build`/`cargo test` - all pass, zero warnings\n- [x] `cargo clippy` on `cel-parser`, `adam-lang`, and `begin` (both feature variants) - all clean\n- [x] `cargo fmt --all --check` - clean\n- [x] Verified `round`/`as` work inside an actual `adam-lang` sheet (not just raw CEL expressions) before touching `image_resize.adm2`\n- [x] Verified the full redesigned `image_resize.adm2` end-to-end: initial state, doubling DPI (pixel counts double as whole numbers), a direct odd-value pixel write, and a rounding edge case (`round(499.5) == 500`, confirming half-away-from-zero) against the live solver\n- [x] Confirmed live in the running desktop app\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n","reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/63/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/stlab/cel-rs/issues/63/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/comments/5146835752","html_url":"https://github.com/stlab/cel-rs/pull/63#issuecomment-5146835752","issue_url":"https://api.github.com/repos/stlab/cel-rs/issues/63","id":5146835752,"node_id":"IC_kwDON4qS5c8AAAABMsZ7KA","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-07-31T19:46:14Z","updated_at":"2026-07-31T19:46:14Z","body":"Implemented `as` as a real cast operator (not a stopgap) - lives in the grammar between multiplicative and unary precedence, so `round(f) as i32` and chains like `x as i32 as f64` work as expected.\n\nCovers all numeric-to-numeric conversions:\n- int <-> int: checked via `TryFrom` (all 144 pairs, including same-width/identity)\n- int -> float: infallible (`as`), matching Rust\n- float -> int: checked (finite + range), value still truncates toward zero like Rust's `as` - only range/finiteness is checked, not \"is it already whole\"\n- f32 -> f64 infallible, f64 -> f32 checked\n\n`round()` is back to `f64 -> f64` (matches `f64::round` exactly); `float()` is removed, superseded by the cast. `image_resize.adm2` updated to `round(width_in * dpi) as i32` / `width_px as f64`, and I re-verified the demo end-to-end (parses, and dpi/width_px edits recompute correctly through the three-way constraint).\n\nUniversal call syntax (`f.round() as i32`) sounds great - happy to adapt once that lands, but didn't want to block this on it.","reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/comments/5146835752/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null}},"public":true,"created_at":"2026-07-31T19:46:14Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16346411863","type":"PushEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"repository_id":931828453,"push_id":38653004658,"ref":"refs/heads/adam-lang-round-float-builtin","head":"78732e5d1dd95381a7c200c1142e8e301775851f","before":"6503cd1c6daac5d8053f5f3a9917cfa01dd20fd0"},"public":true,"created_at":"2026-07-31T19:42:43Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16343788479","type":"PushEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"repository_id":931828453,"push_id":38650369742,"ref":"refs/heads/adam-lang-round-float-builtin","head":"6503cd1c6daac5d8053f5f3a9917cfa01dd20fd0","before":"0d0149251f793945f1cd3e7dd93b5001acbd234b"},"public":true,"created_at":"2026-07-31T18:56:12Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12606109808","type":"PullRequestReviewCommentEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"created","comment":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/comments/3692710711","pull_request_review_id":4831382178,"id":3692710711,"node_id":"PRRC_kwDON4qS5c7cGks3","diff_hunk":"@@ -0,0 +1,63 @@\n+sheet image_resize {\n+    // Reference pixel dimensions of the original source image. These are\n+    // never an output of any relationship below, so they stay fixed.\n+    cell orig_width: f64 = 1024.0;\n+    cell orig_height: f64 = 768.0;\n+\n+    // Cells intended to be *derived* now (declared early = lower initial\n+    // strength): pixel dimensions and zoom percent follow from the physical\n+    // size and resolution below.\n+    cell width_px: f64 = 1024.0;\n+    cell height_px: f64 = 768.0;\n+    cell percent: f64;\n+\n+    // \"Constrain Proportions\": 1 = locked, 0 = unlocked.\n+    cell constrain_proportions: i32 = 1;\n+\n+    // Cells intended to stay *sources* by default now (declared last =\n+    // higher initial strength): physical size in inches and resolution.\n+    // Changing dpi therefore recomputes width_px/height_px, holding these\n+    // fixed, instead of the other way around.\n+    cell width_in: f64 = 3.4133333333333336;\n+    cell height_in: f64 = 2.56;\n+    cell dpi: f64 = 300.0;\n+\n+    // width_px, width_in, and dpi are a three-way constraint: fix any two,\n+    // the third follows.\n+    relationship {\n+        method [width_px, dpi] -> [width_in] { width_px / dpi }\n+        method [width_in, dpi] -> [width_px] { width_in * dpi }\n+        method [width_px, width_in] -> [dpi] { width_px / width_in }\n+    }\n+\n+    // Same triangle for height, sharing the same dpi cell as the width\n+    // triangle above.\n+    relationship {\n+        method [height_px, dpi] -> [height_in] { height_px / dpi }\n+        method [height_in, dpi] -> [height_px] { height_in * dpi }\n+        method [height_px, height_in] -> [dpi] { height_px / height_in }\n+    }\n+\n+    // percent is just width_px expressed relative to the original width.\n+    relationship {\n+        method [width_px, orig_width] -> [percent] { width_px / orig_width * 100.0 }\n+        method [percent, orig_width] -> [width_px] { orig_width * percent / 100.0 }\n+    }\n+\n+    // Aspect-ratio lock, now expressed on the *inch* cells instead of the\n+    // pixel cells: width_in/height_in are the sources that dpi divides\n+    // into, so the lock has to constrain them directly - constraining\n+    // width_px/height_px instead would double-claim cells the two\n+    // triangles above already derive, which the planner would reject as\n+    // a conflict.\n+    conditional constrain_proportions {\n+        1i32 => {\n+            relationship {\n+                method [width_in, orig_width, orig_height] -> [height_in] { width_in * orig_height / orig_width }\n+                method [height_in, orig_width, orig_height] -> [width_in] { height_in * orig_width / orig_height }\n+            }\n+        }\n+        0i32 => {}","path":"begin/assets/image_resize.adm2","commit_id":"8d7d3bb8292394ca0fa3e2e7de6b7ff7de9097dd","original_commit_id":"8d7d3bb8292394ca0fa3e2e7de6b7ff7de9097dd","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"Done in 172fa64 - dropped both empty branches.","created_at":"2026-07-31T18:54:59Z","updated_at":"2026-07-31T18:54:59Z","html_url":"https://github.com/stlab/cel-rs/pull/61#discussion_r3692710711","pull_request_url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/stlab/cel-rs/pulls/comments/3692710711"},"html":{"href":"https://github.com/stlab/cel-rs/pull/61#discussion_r3692710711"},"pull_request":{"href":"https://api.github.com/repos/stlab/cel-rs/pulls/61"}},"reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/comments/3692710711/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"in_reply_to_id":3692252191,"original_position":60,"position":1,"subject_type":"line"},"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","id":4173942576,"number":61,"head":{"ref":"begin-demo-picker-and-graph-polish","sha":"679e02954d530330f0909dc313434cc30119969a","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"main","sha":"73dbda8677a1629cc9a49d1c18ed5836c859d1e6","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}}},"public":true,"created_at":"2026-07-31T18:54:59Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12606109559","type":"PullRequestReviewEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"review":{"id":4831382178,"node_id":"PRR_kwDON4qS5c8AAAABH_kKog","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"body":null,"commit_id":"172fa641c5bf8464670bbc62a9cc17fe2147cc85","state":"commented","html_url":"https://github.com/stlab/cel-rs/pull/61#pullrequestreview-4831382178","pull_request_url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","_links":{"html":{"href":"https://github.com/stlab/cel-rs/pull/61#pullrequestreview-4831382178"},"pull_request":{"href":"https://api.github.com/repos/stlab/cel-rs/pulls/61"}},"submitted_at":"2026-07-31T18:54:59Z","updated_at":"2026-07-31T18:54:59Z"},"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","id":4173942576,"number":61,"head":{"ref":"begin-demo-picker-and-graph-polish","sha":"679e02954d530330f0909dc313434cc30119969a","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"main","sha":"73dbda8677a1629cc9a49d1c18ed5836c859d1e6","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}},"action":"created"},"public":true,"created_at":"2026-07-31T18:55:00Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16343707420","type":"PushEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"repository_id":931828453,"push_id":38650288765,"ref":"refs/heads/begin-demo-picker-and-graph-polish","head":"172fa641c5bf8464670bbc62a9cc17fe2147cc85","before":"8d7d3bb8292394ca0fa3e2e7de6b7ff7de9097dd"},"public":true,"created_at":"2026-07-31T18:54:45Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12596421891","type":"PullRequestEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"opened","number":63,"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/63","id":4178788045,"number":63,"head":{"ref":"adam-lang-round-float-builtin","sha":"5afe50c49a7ba0bc2810fd74b686f81b5b4b88ff","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"begin-demo-picker-and-graph-polish","sha":"cc9a3043b74dbf45f244bf64f23067155c45e06c","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}}},"public":true,"created_at":"2026-07-31T15:11:06Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16328976578","type":"CreateEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"ref":"adam-lang-round-float-builtin","ref_type":"branch","full_ref":"refs/heads/adam-lang-round-float-builtin","master_branch":"main","description":"WIP of library for type-safe concatenative languace","pusher_type":"user"},"public":true,"created_at":"2026-07-31T15:10:45Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16326767580","type":"PushEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"repository_id":931828453,"push_id":38633318224,"ref":"refs/heads/begin-demo-picker-and-graph-polish","head":"8d7d3bb8292394ca0fa3e2e7de6b7ff7de9097dd","before":"1d49b810aa11a77acad866d3b79d02f8ee681e77"},"public":true,"created_at":"2026-07-31T14:43:13Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12594208549","type":"IssuesEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"opened","issue":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/62","repository_url":"https://api.github.com/repos/stlab/cel-rs","labels_url":"https://api.github.com/repos/stlab/cel-rs/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/stlab/cel-rs/issues/62/comments","events_url":"https://api.github.com/repos/stlab/cel-rs/issues/62/events","html_url":"https://github.com/stlab/cel-rs/issues/62","id":5030479753,"node_id":"I_kwDON4qS5c8AAAABK9cHiQ","number":62,"title":".githooks/pre-commit is tracked as non-executable, so git silently skips it","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-07-31T14:25:46Z","updated_at":"2026-07-31T14:25:46Z","closed_at":null,"assignee":null,"issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"## Summary\n\n`.githooks/pre-commit` (the `cargo fmt --all --check` gate referenced in `CLAUDE.md`'s setup instructions) is committed without the executable bit, so after running `git config core.hooksPath .githooks` as instructed, commits still succeed with a silent hint instead of actually running the formatting check:\n\n```\nhint: The '.githooks/pre-commit' hook was ignored because it's not set as executable.\nhint: You can disable this warning with `git config advice.ignoredHook false`.\n```\n\nGit tracks the executable bit as part of a file's mode in the tree, so this isn't a local/per-clone issue - every fresh clone gets the same non-executable file and the same silent skip.\n\n## Repro\n\n```\n$ git ls-files -s .githooks/pre-commit\n100644 1684176ca053cf372625e1033190153d7654d37e 0\t.githooks/pre-commit\n```\n\nMode `100644` instead of the expected `100755`.\n\n## Impact\n\nAnyone following `CLAUDE.md`'s onboarding step (`git config core.hooksPath .githooks`) reasonably assumes formatting is now enforced pre-commit. It isn't - `cargo fmt --all --check` never runs unless someone runs it manually before committing. Given the hint text alone is easy to miss/ignore in normal terminal output, this could let unformatted code slip into a commit without anyone noticing.\n\n## Fix\n\n```\nchmod +x .githooks/pre-commit\ngit add .githooks/pre-commit\ngit commit -m \"fix: make .githooks/pre-commit executable so it actually runs\"\n```","reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/62/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/stlab/cel-rs/issues/62/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null}},"public":true,"created_at":"2026-07-31T14:25:47Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16325215932","type":"PushEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"repository_id":931828453,"push_id":38631762888,"ref":"refs/heads/begin-demo-picker-and-graph-polish","head":"1d49b810aa11a77acad866d3b79d02f8ee681e77","before":"607c22c0c78d6e4219e07fa0d7e7c6467328dff4"},"public":true,"created_at":"2026-07-31T14:24:15Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12564290299","type":"PullRequestEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"opened","number":61,"pull_request":{"url":"https://api.github.com/repos/stlab/cel-rs/pulls/61","id":4173942576,"number":61,"head":{"ref":"begin-demo-picker-and-graph-polish","sha":"679e02954d530330f0909dc313434cc30119969a","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}},"base":{"ref":"main","sha":"73dbda8677a1629cc9a49d1c18ed5836c859d1e6","repo":{"id":931828453,"url":"https://api.github.com/repos/stlab/cel-rs","name":"cel-rs"}}}},"public":true,"created_at":"2026-07-31T00:20:31Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"16264678108","type":"CreateEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"ref":"begin-demo-picker-and-graph-polish","ref_type":"branch","full_ref":"refs/heads/begin-demo-picker-and-graph-polish","master_branch":"main","description":"WIP of library for type-safe concatenative languace","pusher_type":"user"},"public":true,"created_at":"2026-07-31T00:20:18Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12556395000","type":"IssueCommentEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/60","repository_url":"https://api.github.com/repos/stlab/cel-rs","labels_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/comments","events_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/events","html_url":"https://github.com/stlab/cel-rs/issues/60","id":5023667052,"node_id":"I_kwDON4qS5c8AAAABK28TbA","number":60,"title":"cel-runtime: Segment::op1r panics (buffer underflow) instead of returning Err on failure","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-07-30T20:19:57Z","updated_at":"2026-08-11T18:46:54Z","closed_at":"2026-08-11T18:46:54Z","assignee":null,"issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"## Summary\n\nWhen a `Segment` operation added via `op1r` returns `Err`, the error-unwind path panics with `attempt to subtract with overflow` instead of propagating the error. Reproduced at `75a0b46` (current `main`).\n\n## Minimal repro\n\n```rust\nuse cel_rs::{Callable, Segment};\n\nfn main() {\n    let parse_and_double = Segment::<(&str,)>::new()\n        .op1r(|s: &str| s.parse::<u32>().map_err(anyhow::Error::from))\n        .op1(|n| n * 2);\n\n    // Panics instead of returning Err:\n    let _ = parse_and_double.call((\"nope\",));\n}\n```\n\n```\nthread 'main' panicked at src/raw_stack.rs:91:24:\nattempt to subtract with overflow\n```\n\n## Root cause\n\n`RawSegment::push_op1r_` (`src/raw_segment.rs:91-101`) pops the operation's argument off the raw stack *before* invoking the closure:\n\n```rust\nfn push_op1r_<const PADDING0: bool, T, R, F>(&mut self)\nwhere\n    F: Fn(&mut RawStack, T) -> Result<R> + 'static,\n    T: 'static,\n    R: 'static,\n{\n    self.ops.push(|storage, p, stack| {\n        let (f, r) = unsafe { storage.next::<F>(p) };\n        let x: T = unsafe { stack.pop(PADDING0) };\n        let result = f(stack, x)?;\n        ...\n```\n\nBut `Segment::op1r` (`src/segment.rs:144-154`) builds its error-unwind closure from the *pre-op* `Stack` type, which still has that same argument as its `Head`:\n\n```rust\npub fn op1r<R, F>(mut self, op: F) -> Segment<Args, CStackList<R, Stack::Tail>>\nwhere\n    F: Fn(Stack::Head) -> Result<R> + 'static,\n    R: 'static,\n{\n    self.segment.raw1(\n        move |stack, x| op(x).inspect_err(|_| Stack::drop_stack(stack)),\n        Stack::HEAD_PADDING != 0,\n    );\n    self.into()\n}\n```\n\nSo on error, `Stack::drop_stack(stack)` tries to drop `Stack::Head` (the argument), which has already been popped by `raw1`/`push_op1r_` to produce `x`. That's one drop too many, which underflows `self.buffer.len() - size_of::<T>()` in `RawStack::pop` (`src/raw_stack.rs:91`).\n\nContrast with `op0r` (`src/segment.rs:124-132`), where `Stack` correctly reflects everything still on the actual stack at the point of failure, since `op0` never pops anything - that path is fine.\n\n## Suggested fix\n\nThe unwind closure in `op1r` should drop `Stack::Tail` (what remains after the already-popped `Head`), not `Stack` itself, e.g. `Stack::Tail::drop_stack(stack)`.\n\n## Environment\n\n- rustc 1.89.0, cargo 1.89.0\n- Reproduced on `main` @ `75a0b46`","reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/60/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null},"comment":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/comments/5135931450","html_url":"https://github.com/stlab/cel-rs/issues/60#issuecomment-5135931450","issue_url":"https://api.github.com/repos/stlab/cel-rs/issues/60","id":5135931450,"node_id":"IC_kwDON4qS5c8AAAABMiAYOg","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-07-30T20:28:13Z","updated_at":"2026-07-30T20:28:13Z","body":"Confirmed still present after the workspace restructure. Re-tested at `6c0ae13` (current `main`, 503 commits past the original repro at `75a0b46`).\n\nThe `src/` paths in the original report have moved:\n- `Segment::op1r` is now at `cel-runtime/src/segment.rs:153-164`\n- `RawSegment::push_op1r_` is now at `cel-runtime/src/raw_segment.rs:118-131`\n- `RawStack::pop`'s underflow is now at `cel-runtime/src/raw_stack.rs:282`\n\nThe code at all three sites is otherwise unchanged from the original report - same bug, same root cause: `push_op1r_` pops the argument off the raw stack before invoking the closure, but `op1r`'s error-unwind closure calls `Stack::drop_stack(stack)` using the pre-op `Stack` type, which still counts that same (already-popped) argument as its `Head`.\n\nRepro (updated for the current API, `cel_runtime::{Callable, Segment}` instead of `cel_rs::{Callable, Segment}`):\n\n```rust\nuse cel_runtime::{Callable, Segment};\n\nlet parse_and_double = Segment::<(&str,)>::new()\n    .op1r(|s: &str| s.parse::<u32>().map_err(anyhow::Error::from))\n    .op1(|n| n * 2);\n\nlet _ = parse_and_double.call((\"nope\",)); // panics instead of returning Err\n```\n\n```\nthread '...' panicked at cel-runtime/src/raw_stack.rs:282:24:\nattempt to subtract with overflow\n```\n\nSuggested fix is unchanged: the unwind closure in `op1r` should drop `Stack::Tail`, not `Stack`.","pin":null,"reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/comments/5135931450/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null}},"public":true,"created_at":"2026-07-30T20:28:13Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"12556037245","type":"IssuesEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":931828453,"name":"stlab/cel-rs","url":"https://api.github.com/repos/stlab/cel-rs"},"payload":{"action":"opened","issue":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/60","repository_url":"https://api.github.com/repos/stlab/cel-rs","labels_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/comments","events_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/events","html_url":"https://github.com/stlab/cel-rs/issues/60","id":5023667052,"node_id":"I_kwDON4qS5c8AAAABK28TbA","number":60,"title":"cel-runtime: Segment::op1r panics (buffer underflow) instead of returning Err on failure","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-07-30T20:19:57Z","updated_at":"2026-08-11T18:46:54Z","closed_at":"2026-08-11T18:46:54Z","assignee":null,"issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"## Summary\n\nWhen a `Segment` operation added via `op1r` returns `Err`, the error-unwind path panics with `attempt to subtract with overflow` instead of propagating the error. Reproduced at `75a0b46` (current `main`).\n\n## Minimal repro\n\n```rust\nuse cel_rs::{Callable, Segment};\n\nfn main() {\n    let parse_and_double = Segment::<(&str,)>::new()\n        .op1r(|s: &str| s.parse::<u32>().map_err(anyhow::Error::from))\n        .op1(|n| n * 2);\n\n    // Panics instead of returning Err:\n    let _ = parse_and_double.call((\"nope\",));\n}\n```\n\n```\nthread 'main' panicked at src/raw_stack.rs:91:24:\nattempt to subtract with overflow\n```\n\n## Root cause\n\n`RawSegment::push_op1r_` (`src/raw_segment.rs:91-101`) pops the operation's argument off the raw stack *before* invoking the closure:\n\n```rust\nfn push_op1r_<const PADDING0: bool, T, R, F>(&mut self)\nwhere\n    F: Fn(&mut RawStack, T) -> Result<R> + 'static,\n    T: 'static,\n    R: 'static,\n{\n    self.ops.push(|storage, p, stack| {\n        let (f, r) = unsafe { storage.next::<F>(p) };\n        let x: T = unsafe { stack.pop(PADDING0) };\n        let result = f(stack, x)?;\n        ...\n```\n\nBut `Segment::op1r` (`src/segment.rs:144-154`) builds its error-unwind closure from the *pre-op* `Stack` type, which still has that same argument as its `Head`:\n\n```rust\npub fn op1r<R, F>(mut self, op: F) -> Segment<Args, CStackList<R, Stack::Tail>>\nwhere\n    F: Fn(Stack::Head) -> Result<R> + 'static,\n    R: 'static,\n{\n    self.segment.raw1(\n        move |stack, x| op(x).inspect_err(|_| Stack::drop_stack(stack)),\n        Stack::HEAD_PADDING != 0,\n    );\n    self.into()\n}\n```\n\nSo on error, `Stack::drop_stack(stack)` tries to drop `Stack::Head` (the argument), which has already been popped by `raw1`/`push_op1r_` to produce `x`. That's one drop too many, which underflows `self.buffer.len() - size_of::<T>()` in `RawStack::pop` (`src/raw_stack.rs:91`).\n\nContrast with `op0r` (`src/segment.rs:124-132`), where `Stack` correctly reflects everything still on the actual stack at the point of failure, since `op0` never pops anything - that path is fine.\n\n## Suggested fix\n\nThe unwind closure in `op1r` should drop `Stack::Tail` (what remains after the already-popped `Head`), not `Stack` itself, e.g. `Stack::Tail::drop_stack(stack)`.\n\n## Environment\n\n- rustc 1.89.0, cargo 1.89.0\n- Reproduced on `main` @ `75a0b46`","reactions":{"url":"https://api.github.com/repos/stlab/cel-rs/issues/60/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/stlab/cel-rs/issues/60/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}},"public":true,"created_at":"2026-07-30T20:19:58Z","org":{"id":2448845,"login":"stlab","gravatar_id":"","url":"https://api.github.com/orgs/stlab","avatar_url":"https://avatars.githubusercontent.com/u/2448845?"}},{"id":"11723496199","type":"IssueCommentEvent","actor":{"id":3770603,"login":"camio","display_login":"camio","gravatar_id":"","url":"https://api.github.com/users/camio","avatar_url":"https://avatars.githubusercontent.com/u/3770603?"},"repo":{"id":909116970,"name":"bemanproject/beman-tidy","url":"https://api.github.com/repos/bemanproject/beman-tidy"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330","repository_url":"https://api.github.com/repos/bemanproject/beman-tidy","labels_url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330/comments","events_url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330/events","html_url":"https://github.com/bemanproject/beman-tidy/issues/330","id":4849734511,"node_id":"I_kwDONjAGKs8AAAABIRETbw","number":330,"title":"[bemanification] Run beman-tidy on beman.indirect","user":{"login":"neatudarius","id":8947836,"node_id":"MDQ6VXNlcjg5NDc4MzY=","avatar_url":"https://avatars.githubusercontent.com/u/8947836?v=4","gravatar_id":"","url":"https://api.github.com/users/neatudarius","html_url":"https://github.com/neatudarius","followers_url":"https://api.github.com/users/neatudarius/followers","following_url":"https://api.github.com/users/neatudarius/following{/other_user}","gists_url":"https://api.github.com/users/neatudarius/gists{/gist_id}","starred_url":"https://api.github.com/users/neatudarius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neatudarius/subscriptions","organizations_url":"https://api.github.com/users/neatudarius/orgs","repos_url":"https://api.github.com/users/neatudarius/repos","events_url":"https://api.github.com/users/neatudarius/events{/privacy}","received_events_url":"https://api.github.com/users/neatudarius/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":7935279593,"node_id":"LA_kwDONjAGKs8AAAAB2PrB6Q","url":"https://api.github.com/repos/bemanproject/beman-tidy/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true,"description":"Good for newcomers"},{"id":8767653509,"node_id":"LA_kwDONjAGKs8AAAACCpfGhQ","url":"https://api.github.com/repos/bemanproject/beman-tidy/labels/beman-tidy%20check","name":"beman-tidy check","color":"46e236","default":false,"description":""}],"state":"closed","locked":false,"assignees":[{"login":"neatudarius","id":8947836,"node_id":"MDQ6VXNlcjg5NDc4MzY=","avatar_url":"https://avatars.githubusercontent.com/u/8947836?v=4","gravatar_id":"","url":"https://api.github.com/users/neatudarius","html_url":"https://github.com/neatudarius","followers_url":"https://api.github.com/users/neatudarius/followers","following_url":"https://api.github.com/users/neatudarius/following{/other_user}","gists_url":"https://api.github.com/users/neatudarius/gists{/gist_id}","starred_url":"https://api.github.com/users/neatudarius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neatudarius/subscriptions","organizations_url":"https://api.github.com/users/neatudarius/orgs","repos_url":"https://api.github.com/users/neatudarius/repos","events_url":"https://api.github.com/users/neatudarius/events{/privacy}","received_events_url":"https://api.github.com/users/neatudarius/received_events","type":"User","user_view_type":"public","site_admin":false}],"milestone":null,"comments":6,"created_at":"2026-07-09T20:39:31Z","updated_at":"2026-07-13T23:09:53Z","closed_at":"2026-07-13T23:09:53Z","assignee":{"login":"neatudarius","id":8947836,"node_id":"MDQ6VXNlcjg5NDc4MzY=","avatar_url":"https://avatars.githubusercontent.com/u/8947836?v=4","gravatar_id":"","url":"https://api.github.com/users/neatudarius","html_url":"https://github.com/neatudarius","followers_url":"https://api.github.com/users/neatudarius/followers","following_url":"https://api.github.com/users/neatudarius/following{/other_user}","gists_url":"https://api.github.com/users/neatudarius/gists{/gist_id}","starred_url":"https://api.github.com/users/neatudarius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neatudarius/subscriptions","organizations_url":"https://api.github.com/users/neatudarius/orgs","repos_url":"https://api.github.com/users/neatudarius/repos","events_url":"https://api.github.com/users/neatudarius/events{/privacy}","received_events_url":"https://api.github.com/users/neatudarius/received_events","type":"User","user_view_type":"public","site_admin":false},"issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"Run `beman-tidy` on target Beman library with `default mode` (check example in https://github.com/bemanproject/optional/pull/210).\n\nLinks:\n- [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md)\n- [beman-tidy](https://github.com/bemanproject/beman-tidy) -> [How to Integrate beman-tidy pre-commit Hook in Your Library](https://github.com/bemanproject/beman-tidy/blob/main/docs/pre-commit.md)\n\nGoal: Run `beman-tidy` with `default mode`.\n  - [x] 1. **Add beman-tidy (default mode - requirements only)** to  target library - follow  [How to Integrate beman-tidy pre-commit](https://github.com/bemanproject/beman-tidy/blob/main/docs/pre-commit.md).\n  - [x] 2. **Report findings** in a comment on this issue. \n  - [x] 3. **Open a PR** for each check which needs to be fixed in target library. Get review and merge the PRs.\n  - [x] 4. **Open a PR** to enable `beman-tidy` in default mode on `main` in target library. \n\nFollow-up goal:  **Attempt** to run `beman-tidy` with `--require-all mode`.\n  - [ ] Make sure you have `beman-tidy` with `default mode` enabled in `main`.\n  - [ ] Tag/ask in this issue all codeowners (check `.github/CODEOWNERS`) if they would like to also commit for `--require-all` mode.  Present the list of `required` checks currently failing.\n  - [ ] Get approval from owners to continue.\n  - [ ] Apply changes following previous steps 2 + 3 + 4.","reactions":{"url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null},"comment":{"url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/comments/4960479883","html_url":"https://github.com/bemanproject/beman-tidy/issues/330#issuecomment-4960479883","issue_url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/330","id":4960479883,"node_id":"IC_kwDONjAGKs8AAAABJ6rqiw","user":{"login":"camio","id":3770603,"node_id":"MDQ6VXNlcjM3NzA2MDM=","avatar_url":"https://avatars.githubusercontent.com/u/3770603?v=4","gravatar_id":"","url":"https://api.github.com/users/camio","html_url":"https://github.com/camio","followers_url":"https://api.github.com/users/camio/followers","following_url":"https://api.github.com/users/camio/following{/other_user}","gists_url":"https://api.github.com/users/camio/gists{/gist_id}","starred_url":"https://api.github.com/users/camio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camio/subscriptions","organizations_url":"https://api.github.com/users/camio/orgs","repos_url":"https://api.github.com/users/camio/repos","events_url":"https://api.github.com/users/camio/events{/privacy}","received_events_url":"https://api.github.com/users/camio/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-07-13T16:57:50Z","updated_at":"2026-07-13T16:57:50Z","body":"@neatudarius I agree!","pin":null,"reactions":{"url":"https://api.github.com/repos/bemanproject/beman-tidy/issues/comments/4960479883/reactions","total_count":1,"+1":1,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null}},"public":true,"created_at":"2026-07-13T16:57:50Z","org":{"id":168566813,"login":"bemanproject","gravatar_id":"","url":"https://api.github.com/orgs/bemanproject","avatar_url":"https://avatars.githubusercontent.com/u/168566813?"}}]