Skip to content

ci: declare workflow-level contents: read on 5 workflows#1179

Merged
ko1 merged 1 commit into
ruby:masterfrom
arpitjain099:chore/declare-workflow-perms-readonly
May 27, 2026
Merged

ci: declare workflow-level contents: read on 5 workflows#1179
ko1 merged 1 commit into
ruby:masterfrom
arpitjain099:chore/declare-workflow-perms-readonly

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Pins the default GITHUB_TOKEN to contents: read on 5 workflows in .github/workflows/ that don't call a GitHub API beyond the initial checkout.

Why

CVE-2025-30066 (March 2025 tj-actions/changed-files supply-chain compromise) exfiltrated GITHUB_TOKEN from workflow logs. Pinning per workflow caps runtime authority irrespective of the repo or org default, gives drift protection if the default ever widens, and is credited per-file by the OpenSSF Scorecard Token-Permissions check.

YAML validated locally with yaml.safe_load on each touched file.

Pins the default GITHUB_TOKEN to contents: read on the workflows in
.github/workflows/ that don't call a GitHub API beyond the initial
checkout. The other workflows in this directory are left implicit
because they need write scopes that a maintainer is better placed
to declare.

Motivation: CVE-2025-30066 (March 2025 tj-actions/changed-files
compromise) exfiltrated GITHUB_TOKEN from workflow logs. Per-workflow
caps bound runtime authority irrespective of repo or org default,
give drift protection if the default ever widens, and are credited
per-file by the OpenSSF Scorecard Token-Permissions check.

YAML validated locally with yaml.safe_load.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@launchable-app
Copy link
Copy Markdown

launchable-app Bot commented May 26, 2026

3/691 Tests Failed

/home/runner/work/debug/debug/test/console/config_fork_test.rb#test_child_case
Test::Unit::AssertionFailedError: 
--------------------
| Debugger Session |
--------------------

> DEBUGGER (client): Connected. PID:6383, $0:/tmp/debug-20260526-3007-ddjpnt.rb
> 
> [1, 10] in /tmp/debug-20260526-3007-ddjpnt.rb
> =>   1| if !(pid = fork)
>      2|   binding.b do: 'p :child_enter'
>      3|   a = 1
>      4|   b = 2
>      5|   c = 3
>      6|   binding.b do: 'p :child_leave'
>      7| else # parent
>      8|   sleep 0.5
>      9|   binding.b do: 'p :parent_enter'
>     10|   a = 1
> =>#0	<main> at /tmp/debug-20260526-3007-ddjpnt.rb:1
> config fork_mode = child
> (rdbg:remote) config fork_mode = child
> # CONTROL: Control which process activates a debugger after fork (both/parent/child) (default: both)
> fork_mode = :child
> (rdbg:remote) b 5
> #0  BP - Line  /tmp/debug-20260526-3007-ddjpnt.rb:5 (line)
> (rdbg:remote) b 10
> #1  BP - Line  /tmp/debug-20260526-3007-ddjpnt.rb:10 (line)
> (rdbg:remote) c


--------------------
| Debuggee Session |
--------------------

> DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1001/rdbg-3007-168)
> DEBUGGER: wait for debugger connection...
> DEBUGGER: Connected.
> DEBUGGER: Disconnected.
> #<Thread:0x00007f0bbbea72e8@DEBUGGER__::Server::reader /home/runner/work/debug/debug/lib/debug/server.rb:45 run> terminated with exception (report_on_exception is true):
> /home/runner/work/debug/debug/lib/debug/server.rb:92:in `===': �[1mDEBUGGER__::UI_ServerBase::Terminate (�[1;4mDEBUGGER__::UI_ServerBase::Terminate�[m�[1m)�[m
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:92:in `rescue in block in activate'
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:47:in `block in activate'
> #<Thread:0x00007f0bbbea70b8@DEBUGGER__::SESSION@server /home/runner/work/debug/debug/lib/debug/session.rb:179 run> terminated with exception (report_on_exception is true):
> /home/runner/work/debug/debug/lib/debug/server.rb:92:in `===': �[1mDEBUGGER__::UI_ServerBase::Terminate (�[1;4mDEBUGGER__::UI_ServerBase::Terminate�[m�[1m)�[m
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:92:in `rescue in block in activate'
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:47:in `block in activate'
> /home/runner/work/debug/debug/lib/debug/server.rb:92:in `===': �[1mDEBUGGER__::UI_ServerBase::Terminate (�[1;4mDEBUGGER__::UI_ServerBase::Terminate�[m�[1m)�[m
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:92:in `rescue in block in activate'
> 	from /home/runner/work/debug/debug/lib/debug/server.rb:47:in `block in activate'
> DEBUGGER: Connected.
> DEBUGGER: Disconnected.


-------------------
| Failure Message |
-------------------

Expected all commands/assertions to be executed. Still have 3 left.
Associated exception: Errno::EIO - Input/output error @ io_fillbuf - fd:12 /dev/pts/3  /home/runner/work/debug/debug/test/support/console_test_case.rb:128:in `gets'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:128:in `block (2 levels) in run_test_scenario'
  /opt/hostedtoolcache/Ruby/3.1.7/x64/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout'
  /opt/hostedtoolcache/Ruby/3.1.7/x64/lib/ruby/3.1.0/timeout.rb:36:in `block in catch'
  /opt/hostedtoolcache/Ruby/3.1.7/x64/lib/ruby/3.1.0/timeout.rb:36:in `catch'
  /opt/hostedtoolcache/Ruby/3.1.7/x64/lib/ruby/3.1.0/timeout.rb:36:in `catch'
  /opt/hostedtoolcache/Ruby/3.1.7/x64/lib/ruby/3.1.0/timeout.rb:123:in `timeout'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:127:in `block in run_test_scenario'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:123:in `spawn'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:123:in `run_test_scenario'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:269:in `debug_code_on_unix_domain_socket'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:95:in `block (3 levels) in debug_code'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:304:in `block (2 levels) in new_thread'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:303:in `catch'
  /home/runner/work/debug/debug/test/support/console_test_case.rb:303:in `block in new_thread'
 on UNIX Domain Socket mode.
/home/runner/work/debug/debug/test/protocol/hover_raw_dap_test.rb#test_hover_works_correctly ⚠️ flaky
-------------------------
| All Protocol Messages |
-------------------------

V>D {"seq":1,"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"rdbg","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request"}
V>D {"seq":2,"command":"attach","arguments":{"type":"rdbg","name":"Attach with rdbg","request":"attach","rdbgPath":"/home/runner/work/debug/debug/exe/rdbg","debugPort":"/var/folders/kv/w1k6nh1x5fl7vx47b2pd005w0000gn/T/ruby-debug-sock-501/ruby-debug-naotto-8845","autoAttach":true,"__sessionId":"141d9c79-3669-43ec-ac1f-e62598c5a65a"},"type":"request"}
V>D {"seq":3,"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request"}
V>D {"seq":4,"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"RuntimeError"}]},"type":"request"}
V>D {"seq":5,"command":"configurationDone","type":"request"}
V<D {"type":"response","command":"initialize","request_seq":1,"success":true,"message":"Success","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportTerminateDebuggee":true,"supportsTerminateRequest":true,"exceptionBreakpointFilters":[{"filter":"any","label":"rescue any exception","supportsCondition":true},{"filter":"RuntimeError","label":"rescue RuntimeError","supportsCondition":true}],"supportsExceptionFilterOptions":true,"supportsStepBack":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true},"seq":1}
V<D {"type":"event","event":"initialized","seq":2}
V<D {"type":"event","event":"output","body":{"category":"console","output":"Ruby REPL: You can run any Ruby expression here.\nNote that output to the STDOUT/ERR printed on the TERMINAL.\n[experimental]\n  `,COMMAND` runs `COMMAND` debug command (ex: `,info`).\n  `,help` to list all debug commands.\n"},"seq":3}
V<D {"type":"response","command":"attach","request_seq":2,"success":true,"message":"Success","seq":4}
V<D {"type":"response","command":"setFunctionBreakpoints","request_seq":3,"success":true,"message":"Success","seq":5}
V<D {"type":"response","command":"setExceptionBreakpoints","request_seq":4,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true,"message":"#<DEBUGGER__::CatchBreakpoint:0x00007f2ee0838360 @pat=\"RuntimeError\", @key=[:catch, \"RuntimeError\"], @last_exc=nil, @deleted=false, @cond=nil, @command=nil, @path=nil, @tp=#<TracePoint:enabled>>"}]},"seq":6}
V<D {"type":"response","command":"configurationDone","request_seq":5,"success":true,"message":"Success","seq":7}
V<D {"type":"event","event":"stopped","body":{"reason":"pause","threadId":1,"allThreadsStopped":true},"seq":8}
V>D {"seq":6,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":6,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3099-ra6t3j.rb:1:in '<main>'"}]},"seq":9}
V>D {"seq":7,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":7,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3099-ra6t3j.rb:1:in '<main>'"}]},"seq":10}
V>D {"seq":8,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":8,"success":true,"message":"Success","body":{"stackFrames":[{"id":1,"name":"<main>","line":1,"column":1,"source":{"name":"debug-20260526-3099-ra6t3j.rb","path":"/tmp/debug-20260526-3099-ra6t3j.rb","sourceReference":0}}],"totalFrames":1},"seq":11}
V>D {"seq":9,"command":"scopes","arguments":{"frameId":1},"type":"request"}
V<D {"type":"response","command":"scopes","request_seq":9,"success":true,"message":"Success","body":{"scopes":[{"name":"Local variables","presentationHint":"locals","namedVariables":5,"indexedVariables":0,"expensive":false,"variablesReference":2},{"name":"Global variables","presentationHint":"globals","variablesReference":1,"namedVariables":41,"indexedVariables":0,"expensive":false}]},"seq":12}
V>D {"seq":10,"command":"variables","arguments":{"variablesReference":2},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":10,"success":true,"message":"Success","body":{"variables":[{"name":"%self","value":"main","type":"Object","variablesReference":3,"indexedVariables":0,"namedVariables":1},{"name":"a","value":"nil","type":"NilClass","variablesReference":4,"indexedVariables":0,"namedVariables":1},{"name":"b","value":"nil","type":"NilClass","variablesReference":5,"indexedVariables":0,"namedVariables":1},{"name":"c","value":"nil","type":"NilClass","variablesReference":6,"indexedVariables":0,"namedVariables":1},{"name":"d","value":"nil","type":"NilClass","variablesReference":7,"indexedVariables":0,"namedVariables":1},{"name":"e","value":"nil","type":"NilClass","variablesReference":8,"indexedVariables":0,"namedVariables":1}]},"seq":13}
V>D {"seq":11,"command":"setBreakpoints","arguments":{"source":{"name":"target.rb","path":"/tmp/debug-20260526-3099-ra6t3j.rb","sourceReference":0},"lines":[4],"breakpoints":[{"line":4}],"sourceModified":false},"type":"request"}
V<D {"type":"response","command":"setBreakpoints","request_seq":11,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true}]},"seq":14}
V>D {"seq":12,"command":"continue","arguments":{"threadId":1},"type":"request"}
V<D {"type":"response","command":"continue","request_seq":12,"success":true,"message":"Success","body":{"allThreadsContinued":true},"seq":15}
V<D {"type":"event","event":"stopped","body":{"reason":"breakpoint","description":" BP - Line  /tmp/debug-20260526-3099-ra6t3j.rb:4 (line)","text":" BP - Line  /tmp/debug-20260526-3099-ra6t3j.rb:4 (line)","threadId":1,"allThreadsStopped":true},"seq":16}
V>D {"seq":13,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":13,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3099-ra6t3j.rb:4:in '<main>'"}]},"seq":17}
V>D {"seq":14,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":14,"success":true,"message":"Success","body":{"stackFrames":[{"id":2,"name":"<main>","line":4,"column":1,"source":{"name":"debug-20260526-3099-ra6t3j.rb","path":"/tmp/debug-20260526-3099-ra6t3j.rb","sourceReference":0}}],"totalFrames":1},"seq":18}
V>D {"seq":15,"command":"scopes","arguments":{"frameId":2},"type":"request"}
V<D {"type":"response","command":"scopes","request_seq":15,"success":true,"message":"Success","body":{"scopes":[{"name":"Local variables","presentationHint":"locals","namedVariables":5,"indexedVariables":0,"expensive":false,"variablesReference":9},{"name":"Global variables","presentationHint":"globals","variablesReference":1,"namedVariables":41,"indexedVariables":0,"expensive":false}]},"seq":19}
V>D {"seq":16,"command":"variables","arguments":{"variablesReference":9},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":16,"success":true,"message":"Success","body":{"variables":[{"name":"%self","value":"main","type":"Object","variablesReference":10,"indexedVariables":0,"namedVariables":1},{"name":"a","value":"1","type":"Integer","variablesReference":11,"indexedVariables":0,"namedVariables":1},{"name":"b","value":"2","type":"Integer","variablesReference":12,"indexedVariables":0,"namedVariables":1},{"name":"c","value":"3","type":"Integer","variablesReference":13,"indexedVariables":0,"namedVariables":1},{"name":"d","value":"nil","type":"NilClass","variablesReference":14,"indexedVariables":0,"namedVariables":1},{"name":"e","value":"nil","type":"NilClass","variablesReference":15,"indexedVariables":0,"namedVariables":1}]},"seq":20}
V>D {"seq":17,"command":"evaluate","arguments":{"expression":"b","frameId":2,"context":"hover"},"type":"request"}
V<D {"type":"response","command":"evaluate","request_seq":17,"success":true,"message":"Success","body":{"result":"2","type":"Integer","variablesReference":16,"indexedVariables":0,"namedVariables":1},"seq":21}
V>D {"seq":18,"command":"variables","arguments":{"variablesReference":16},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":18,"success":true,"message":"Success","body":{"variables":[{"name":"#class","value":"Integer","type":"Class","variablesReference":17,"indexedVariables":0,"namedVariables":1}]},"seq":22}
V>D {"seq":19,"command":"variables","arguments":{"variablesReference":17},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":19,"success":true,"message":"Success","body":{"variables":[{"name":"#class","value":"Class","type":"Class","variablesReference":18,"indexedVariables":0,"namedVariables":1},{"name":"%ancestors","value":"[Numeric, Comparable, Object, JSON::GeneratorMethods, PP::ObjectMixin, DEBUGGER__::TrapInterceptor, Kernel, BasicObject]","type":"Array","variablesReference":19,"indexedVariables":8,"namedVariables":0}]},"seq":23}

--------------------------
| Last Protocol Messages |
--------------------------

{
  "seq": 18,
  "command": "variables",
  "arguments": {
    "variablesReference": 16
  },
  "type": "request"
}
{
  "type": "response",
  "command": "variables",
  "request_seq": 18,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Integer",
        "type": "Class",
        "variablesReference": 17,
        "indexedVariables": 0,
        "namedVariables": 1
      }
    ]
  },
  "seq": 22
}
{
  "seq": 19,
  "command": "variables",
  "arguments": {
    "variablesReference": 17
  },
  "type": "request"
}
{
  "type": "response",
  "command": "variables",
  "request_seq": 19,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 18,
        "indexedVariables": 0,
        "namedVariables": 1
      },
      {
        "name": "%ancestors",
        "value": "[Numeric, Comparable, Object, JSON::GeneratorMethods, PP::ObjectMixin, DEBUGGER__::TrapInterceptor, Kernel, BasicObject]",
        "type": "Array",
        "variablesReference": 19,
        "indexedVariables": 8,
        "namedVariables": 0
      }
    ]
  },
  "seq": 23
}

--------------------
| Debuggee Session |
--------------------

> DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1001/rdbg-3099-34)
> DEBUGGER: wait for debugger connection...
> DEBUGGER: Connected.


-------------------
| Failure Message |
-------------------

expected:
{
  "type": "response",
  "command": "variables",
  "request_seq": 19,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 18,
        "indexedVariables": 0,
        "namedVariables": "(?-mix:\\d+)"
      },
      {
        "name": "%ancestors",
        "value": "(?-mix:JSON::Ext::Generator::GeneratorMethods::Integer)",
        "type": "Array",
        "variablesReference": 19,
        "indexedVariables": "(?-mix:(9|10))",
        "namedVariables": "(?-mix:\\d+)"
      }
    ]
  }
}

result:
{
  "type": "response",
  "command": "variables",
  "request_seq": 19,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 18,
        "indexedVariables": 0,
        "namedVariables": 1
      },
      {
        "name": "%ancestors",
        "value": "[Numeric, Comparable, Object, JSON::GeneratorMethods, PP::ObjectMixin, DEBUGGER__::TrapInterceptor, Kernel, BasicObject]",
        "type": "Array",
        "variablesReference": 19,
        "indexedVariables": 8,
        "namedVariables": 0
      }
    ]
  },
  "seq": 23
}.
</JSON::Ext::Generator::GeneratorMethods::Integer/> was expected to be =~
<"[Numeric, Comparable, Object, JSON::GeneratorMethods, PP::ObjectMixin, DEBUGGER__::TrapInterceptor, Kernel, BasicObject]">.
/home/runner/work/debug/debug/test/protocol/hover_raw_dap_test.rb#test_1641198331 ⚠️ flaky
-------------------------
| All Protocol Messages |
-------------------------

V>D {"seq":1,"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"rdbg","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request"}
V>D {"seq":2,"command":"attach","arguments":{"type":"rdbg","name":"Attach with rdbg","request":"attach","rdbgPath":"/home/runner/work/debug/debug/exe/rdbg","debugPort":"/var/folders/kv/w1k6nh1x5fl7vx47b2pd005w0000gn/T/ruby-debug-sock-501/ruby-debug-naotto-8845","autoAttach":true,"__sessionId":"141d9c79-3669-43ec-ac1f-e62598c5a65a"},"type":"request"}
V>D {"seq":3,"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request"}
V>D {"seq":4,"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"RuntimeError"}]},"type":"request"}
V>D {"seq":5,"command":"configurationDone","type":"request"}
V<D {"type":"response","command":"initialize","request_seq":1,"success":true,"message":"Success","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportTerminateDebuggee":true,"supportsTerminateRequest":true,"exceptionBreakpointFilters":[{"filter":"any","label":"rescue any exception","supportsCondition":true},{"filter":"RuntimeError","label":"rescue RuntimeError","supportsCondition":true}],"supportsExceptionFilterOptions":true,"supportsStepBack":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true},"seq":1}
V<D {"type":"event","event":"initialized","seq":2}
V<D {"type":"event","event":"output","body":{"category":"console","output":"Ruby REPL: You can run any Ruby expression here.\nNote that output to the STDOUT/ERR printed on the TERMINAL.\n[experimental]\n  `,COMMAND` runs `COMMAND` debug command (ex: `,info`).\n  `,help` to list all debug commands.\n"},"seq":3}
V<D {"type":"response","command":"attach","request_seq":2,"success":true,"message":"Success","seq":4}
V<D {"type":"response","command":"setFunctionBreakpoints","request_seq":3,"success":true,"message":"Success","seq":5}
V<D {"type":"response","command":"setExceptionBreakpoints","request_seq":4,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true,"message":"#<DEBUGGER__::CatchBreakpoint:0x00007f842c164ba0 @pat=\"RuntimeError\", @key=[:catch, \"RuntimeError\"], @last_exc=nil, @deleted=false, @cond=nil, @command=nil, @path=nil, @tp=#<TracePoint:enabled>>"}]},"seq":6}
V<D {"type":"response","command":"configurationDone","request_seq":5,"success":true,"message":"Success","seq":7}
V<D {"type":"event","event":"stopped","body":{"reason":"pause","threadId":1,"allThreadsStopped":true},"seq":8}
V>D {"seq":6,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":6,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3040-boz2i3.rb:1:in `<main>'"}]},"seq":9}
V>D {"seq":7,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":7,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3040-boz2i3.rb:1:in `<main>'"}]},"seq":10}
V>D {"seq":8,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":8,"success":true,"message":"Success","body":{"stackFrames":[{"id":1,"name":"<main>","line":1,"column":1,"source":{"name":"debug-20260526-3040-boz2i3.rb","path":"/tmp/debug-20260526-3040-boz2i3.rb","sourceReference":0}}],"totalFrames":1},"seq":11}
V>D {"seq":9,"command":"scopes","arguments":{"frameId":1},"type":"request"}
V<D {"type":"response","command":"scopes","request_seq":9,"success":true,"message":"Success","body":{"scopes":[{"name":"Local variables","presentationHint":"locals","namedVariables":1,"indexedVariables":0,"expensive":false,"variablesReference":2},{"name":"Global variables","presentationHint":"globals","variablesReference":1,"namedVariables":41,"indexedVariables":0,"expensive":false}]},"seq":12}
V>D {"seq":10,"command":"variables","arguments":{"variablesReference":2},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":10,"success":true,"message":"Success","body":{"variables":[{"name":"%self","value":"main","type":"Object","variablesReference":3,"indexedVariables":0,"namedVariables":1},{"name":"ghi","value":"nil","type":"NilClass","variablesReference":4,"indexedVariables":0,"namedVariables":1}]},"seq":13}
V>D {"seq":11,"command":"setBreakpoints","arguments":{"source":{"name":"target.rb","path":"/tmp/debug-20260526-3040-boz2i3.rb","sourceReference":0},"lines":[29],"breakpoints":[{"line":29}],"sourceModified":false},"type":"request"}
V<D {"type":"response","command":"setBreakpoints","request_seq":11,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true}]},"seq":14}
V>D {"seq":12,"command":"continue","arguments":{"threadId":1},"type":"request"}
V<D {"type":"response","command":"continue","request_seq":12,"success":true,"message":"Success","body":{"allThreadsContinued":true},"seq":15}
V<D {"type":"event","event":"stopped","body":{"reason":"breakpoint","description":" BP - Line  /tmp/debug-20260526-3040-boz2i3.rb:29 (line)","text":" BP - Line  /tmp/debug-20260526-3040-boz2i3.rb:29 (line)","threadId":1,"allThreadsStopped":true},"seq":16}
V>D {"seq":13,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":13,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20260526-3040-boz2i3.rb:29:in `<main>'"}]},"seq":17}
V>D {"seq":14,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":14,"success":true,"message":"Success","body":{"stackFrames":[{"id":2,"name":"<main>","line":29,"column":1,"source":{"name":"debug-20260526-3040-boz2i3.rb","path":"/tmp/debug-20260526-3040-boz2i3.rb","sourceReference":0}}],"totalFrames":1},"seq":18}
V>D {"seq":15,"command":"scopes","arguments":{"frameId":2},"type":"request"}
V<D {"type":"response","command":"scopes","request_seq":15,"success":true,"message":"Success","body":{"scopes":[{"name":"Local variables","presentationHint":"locals","namedVariables":1,"indexedVariables":0,"expensive":false,"variablesReference":5},{"name":"Global variables","presentationHint":"globals","variablesReference":1,"namedVariables":41,"indexedVariables":0,"expensive":false}]},"seq":19}
V>D {"seq":16,"command":"variables","arguments":{"variablesReference":5},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":16,"success":true,"message":"Success","body":{"variables":[{"name":"%self","value":"main","type":"Object","variablesReference":6,"indexedVariables":0,"namedVariables":1},{"name":"ghi","value":"nil","type":"NilClass","variablesReference":7,"indexedVariables":0,"namedVariables":1}]},"seq":20}
V>D {"seq":17,"command":"evaluate","arguments":{"expression":"Abc","frameId":2,"context":"hover"},"type":"request"}
V<D {"type":"response","command":"evaluate","request_seq":17,"success":true,"message":"Success","body":{"result":"Abc","type":"Module","variablesReference":8,"indexedVariables":0,"namedVariables":1},"seq":21}
V>D {"seq":18,"command":"variables","arguments":{"variablesReference":8},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":18,"success":true,"message":"Success","body":{"variables":[{"name":"#class","value":"Module","type":"Class","variablesReference":9,"indexedVariables":0,"namedVariables":1},{"name":"%ancestors","value":"[]","type":"Array","variablesReference":0,"indexedVariables":0,"namedVariables":0}]},"seq":22}
V>D {"seq":19,"command":"evaluate","arguments":{"expression":"Abc::Def123","frameId":2,"context":"hover"},"type":"request"}
V<D {"type":"response","command":"evaluate","request_seq":19,"success":true,"message":"Success","body":{"result":"Abc::Def123","type":"Class","variablesReference":10,"indexedVariables":0,"namedVariables":1},"seq":23}
V>D {"seq":20,"command":"variables","arguments":{"variablesReference":10},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":20,"success":true,"message":"Success","body":{"variables":[{"name":"#class","value":"Class","type":"Class","variablesReference":11,"indexedVariables":0,"namedVariables":1},{"name":"%ancestors","value":"[#<Module:0x000055f84761c278>, Object, JSON::Ext::Generator::GeneratorMethods::Object, DEBUGGER__::TrapInterceptor, DEBUGGER__::ForkInterceptor, PP::ObjectMixin, Kernel, BasicObject...","type":"Array","variablesReference":12,"indexedVariables":8,"namedVariables":0}]},"seq":24}

--------------------------
| Last Protocol Messages |
--------------------------

{
  "seq": 19,
  "command": "evaluate",
  "arguments": {
    "expression": "Abc::Def123",
    "frameId": 2,
    "context": "hover"
  },
  "type": "request"
}
{
  "type": "response",
  "command": "evaluate",
  "request_seq": 19,
  "success": true,
  "message": "Success",
  "body": {
    "result": "Abc::Def123",
    "type": "Class",
    "variablesReference": 10,
    "indexedVariables": 0,
    "namedVariables": 1
  },
  "seq": 23
}
{
  "seq": 20,
  "command": "variables",
  "arguments": {
    "variablesReference": 10
  },
  "type": "request"
}
{
  "type": "response",
  "command": "variables",
  "request_seq": 20,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 11,
        "indexedVariables": 0,
        "namedVariables": 1
      },
      {
        "name": "%ancestors",
        "value": "[#<Module:0x000055f84761c278>, Object, JSON::Ext::Generator::GeneratorMethods::Object, DEBUGGER__::TrapInterceptor, DEBUGGER__::ForkInterceptor, PP::ObjectMixin, Kernel, BasicObject...",
        "type": "Array",
        "variablesReference": 12,
        "indexedVariables": 8,
        "namedVariables": 0
      }
    ]
  },
  "seq": 24
}

--------------------
| Debuggee Session |
--------------------

> DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1001/rdbg-3040-34)
> DEBUGGER: wait for debugger connection...
> DEBUGGER: Connected.


-------------------
| Failure Message |
-------------------

expected:
{
  "type": "response",
  "command": "variables",
  "request_seq": 20,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 11,
        "indexedVariables": 0,
        "namedVariables": "(?-mix:\\d+)"
      },
      {
        "name": "%ancestors",
        "value": "(?-mix:Object)",
        "type": "Array",
        "variablesReference": 12,
        "indexedVariables": "(?-mix:(6|7))",
        "namedVariables": "(?-mix:\\d+)"
      }
    ]
  }
}

result:
{
  "type": "response",
  "command": "variables",
  "request_seq": 20,
  "success": true,
  "message": "Success",
  "body": {
    "variables": [
      {
        "name": "#class",
        "value": "Class",
        "type": "Class",
        "variablesReference": 11,
        "indexedVariables": 0,
        "namedVariables": 1
      },
      {
        "name": "%ancestors",
        "value": "[#<Module:0x000055f84761c278>, Object, JSON::Ext::Generator::GeneratorMethods::Object, DEBUGGER__::TrapInterceptor, DEBUGGER__::ForkInterceptor, PP::ObjectMixin, Kernel, BasicObject...",
        "type": "Array",
        "variablesReference": 12,
        "indexedVariables": 8,
        "namedVariables": 0
      }
    ]
  },
  "seq": 24
}.
</(6|7)/> was expected to be =~
<"8">.

[-> View Test suite health in main branch]

@ko1 ko1 merged commit ce67347 into ruby:master May 27, 2026
32 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants