harbor run -t openthoughts/tasktrove-exp-rpt-stack-ruby-v2-stack-ruby-9543harbor download openthoughts/tasktrove-exp-rpt-stack-ruby-v2-stack-ruby-9543Implement Ruby sources under /app/ so that the test file at /tests/test_solution.rb requires and runs cleanly under rspec (or plain ruby if the file uses Test::Unit / minitest).
tests/test_solution.rb)Below is a deterministic summary of what the test file expects. Use this as the source of truth for require-paths and public API. If the original task description below conflicts with this section, prefer this section.
Language: Ruby
Test framework hint: RSpec / minitest (test.sh runs rspec if RSpec/describe is detected, otherwise plain ruby)
Required local files (the test issues require '<file>' or require_relative ...; these must exist somewhere on the load path — typically /app/<file>.rb. Common helper files like spec_helper, test_helper, helper may need an empty stub):
spec_helperSymbols the test references that you likely need to define (class/module names not from Ruby/RSpec/Rails stdlib; place under /app/):
FFI::LibraryFFI::Type::UINT16FFI::Type::UINT32FFI::Type::UINT64TestLibrary::PATHMethods invoked on instances/objects (you must expose at least these with the indicated arity; return type is inferred from how the test uses the result):
.dirname(...) — called with: 1 arg.enum_type(...) — called with: 1 arg.enum_value(...) — called with: 1 arg.test_tagged_nonint_bitmask1(...) — called with: 1 arg.test_tagged_nonint_bitmask2(...) — called with: 1 arg.test_tagged_nonint_bitmask3(...) — called with: 1 arg.test_tagged_nonint_bitmask4(...) — called with: 1 arg.test_tagged_nonint_bitmask5(...) — called with: 1 arg.test_tagged_nonint_bitmask6(...) — called with: 1 arg.test_tagged_typedef_bitmask1(...) — called with: 1 arg.test_tagged_typedef_bitmask2(...) — called with: 1 arg.test_tagged_typedef_bitmask3(...) — called with: 1 arg.test_tagged_typedef_bitmask4(...) — called with: 1 arg.test_untagged_bitmask(...) — called with: 1 arg.test_untagged_nonint_bitmask(...) — called with: 1 argruby:3.2-slim with build-essential, ruby-dev, libffi-dev for native extensions.rspec, minitest. Other 3rd-party gems (see list above) are best-effort gem install-ed by tests/test.sh before running the test.tests/test.sh) runs bundle install if /app/Gemfile exists, then auto-requires every *.rb file under /app/ (recursively) via $LOAD_PATH.unshift('/app'). So you can place sources at any depth under /app/ as long as relative-require paths resolve.require 'foo/bar' in the test, ensure either the foo gem provides it OR you create /app/foo/bar.rb with the required constants.Task: Implement a Ruby FFI Bitmask DSL in /app to support untagged and tagged bitmasks with explicit/auto bit positions, underlying types, and enum-like utilities used by the tests.
What you need to implement
Implementation guidance (high-level, actionable)
[... description truncated to fit prompt budget ...]