Skip to content

fix(core): reject negative action durations - #70

Merged
SYMBaiEX merged 1 commit into
mainfrom
fix/cycle9-issue34-negative-durations
Oct 5, 2026
Merged

SYMBaiEX merged 1 commit into
mainfrom
fix/cycle9-issue34-negative-durations

Conversation

@SYMBaiEX

@SYMBaiEX SYMBaiEX commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reject negative durationMs values before queued runtime handling for all timed action commands, including trigger and recursively nested sequences/action maps.
  • Keep zero-duration persistence and positive-duration auto-release behavior unchanged; document that SDK duration does not guarantee target-game or frame-observed timing.
  • Add public API tests proving rejected actions emit no adapter command, state sync, or neutral output.

Evidence classification

This is a repository finding, not an independently reported user issue. The runtime previously accepted negative durations; timed actions only auto-release for positive values, allowing a negative-duration input to persist.

Validation

  • bun test packages/core/src/__tests__ — 82 passed.
  • bun run --cwd packages/core typecheck — passed.
  • bun run --cwd packages/core build — passed.
  • biome check on changed TypeScript files — passed.

Closes #34

Summary by CodeRabbit

  • Bug Fixes

    • Negative timed actions are now rejected consistently, including within nested command sequences and action overrides. Rejected inputs do not alter controller state or command history.
    • Zero-duration button and trigger inputs remain active where supported, while positive-duration trigger inputs reset as expected.
  • Documentation

    • Clarified that timed actions reject negative durations, zero-duration inputs can remain persistent, and positive durations request a timed hold. The requested duration may not match how long a game observes the input or how many frames it spans.

Copilot AI balanced review requested due to automatic review settings October 5, 2026 01:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97853141-bd9b-42ad-a356-fd736a3b85f5
📥 Commits

Reviewing files that changed from the base of the PR and between 42d7a3a and c823074.

📒 Files selected for processing (4)
  • packages/core/README.md
  • packages/core/src/__tests__/negative-duration-validation.test.ts
  • packages/core/src/runtime.ts
  • packages/core/src/safety.ts
 ________________________________________________________________________________________________________________________________________
< Use saboteurs to test your testing. Introduce bugs on purpose in a separate copy of the source to verify that testing will catch them. >
 ----------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SYMBaiEX
SYMBaiEX force-pushed the fix/cycle9-issue34-negative-durations branch from 7061f95 to c823074 Compare October 5, 2026 01:56
@SYMBaiEX
SYMBaiEX merged commit c4791dd into main Oct 5, 2026
1 of 2 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.

Reject negative controller action durations

3 participants