ruff_ruby_spo: invokes_action arm — the ERB mutating-button shape (+ …#69
Merged
Conversation
…Predicate::InvokesAction) The nav arm (#62) harvests navigates_to — plain GET links between screens. It does NOT see the mutating BUTTONS (Complete / Delete / Watch), which a consumer's codegen must emit as a <button>, not a <link>. That missing affordance is why the transcoded UI is a read-only preview: nothing harvests the actions, so codegen has nothing to emit. New shared predicate `Predicate::InvokesAction` (count 66 -> 67), same discipline as `selects_view` (#64): a mutating affordance is not a screen, so it gets its own plane and `navigates_to` stays a pure screen->screen graph. Object names the ACTION (route-helper stem, e.g. `work_packages:complete_work_package`), never a screen; the HTTP verb rides the edge struct, not the SPO object. New `ruff_ruby_spo::actions` ERB arm (sibling of navigation.rs / views.rs; closed-vocab line scanner, no Ruby parser, Inferred, honest denominator): - `button_to "L", <t>_path, method: :verb` — POST by default when no method. - `link_to "L", <t>_path, method: :patch|:put|:delete|:post` — the non-GET link idiom; a plain or `method: :get` link_to stays navigation (nav arm). - `ActionVerb` {Post,Put,Patch,Delete} (GET absent by construction), `RubyActionEdge{source,target,verb,label,file}` + `to_triple(ns)`, `ActionScanReport{erb_files,files_with_actions,raw_action_refs}`, `extract_action_edges{,_with_report}`. Non-captures (documented): form-submit-inside-form_with (cross-line join, the #66 lesson), dynamic verbs/targets. Tests: 7 new (button_to+method, bare button_to=POST, link_to :delete, plain/get link_to NOT an action, triple lift, affordance-without-target denominator, ledger). ruff_ruby_spo + ruff_spo_triplet 209/209 green; clippy --all-targets -D warnings clean. This is the harvest half. Consumers (op-nexgen, odoo via #66's arms) emit buttons from these edges; the paired side-menu shape (a Rails menu DSL, .rb) and the OGAR codegen emit are the follow-ups. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9t3fRwXmPC6tCpMtnfTrM
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f5cabb03-cde0-41f0-9dde-dc957d64ce86) |
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.
…Predicate::InvokesAction)
The nav arm (#62) harvests navigates_to — plain GET links between screens. It does NOT see the mutating BUTTONS (Complete / Delete / Watch), which a consumer's codegen must emit as a , not a . That missing affordance is why the transcoded UI is a read-only preview: nothing harvests the actions, so codegen has nothing to emit.
New shared predicate
Predicate::InvokesAction(count 66 -> 67), same discipline asselects_view(#64): a mutating affordance is not a screen, so it gets its own plane andnavigates_tostays a pure screen->screen graph. Object names the ACTION (route-helper stem, e.g.work_packages:complete_work_package), never a screen; the HTTP verb rides the edge struct, not the SPO object.New
ruff_ruby_spo::actionsERB arm (sibling of navigation.rs / views.rs; closed-vocab line scanner, no Ruby parser, Inferred, honest denominator):button_to "L", <t>_path, method: :verb— POST by default when no method.link_to "L", <t>_path, method: :patch|:put|:delete|:post— the non-GET link idiom; a plain ormethod: :getlink_to stays navigation (nav arm).ActionVerb{Post,Put,Patch,Delete} (GET absent by construction),RubyActionEdge{source,target,verb,label,file}+to_triple(ns),ActionScanReport{erb_files,files_with_actions,raw_action_refs},extract_action_edges{,_with_report}.Non-captures (documented): form-submit-inside-form_with (cross-line join, the #66 lesson), dynamic verbs/targets.
Tests: 7 new (button_to+method, bare button_to=POST, link_to :delete, plain/get link_to NOT an action, triple lift, affordance-without-target denominator, ledger). ruff_ruby_spo + ruff_spo_triplet 209/209 green; clippy --all-targets -D warnings clean.
This is the harvest half. Consumers (op-nexgen, odoo via #66's arms) emit buttons from these edges; the paired side-menu shape (a Rails menu DSL, .rb) and the OGAR codegen emit are the follow-ups.