Skip to content

Clarify step() comments on the action/observation timing convention - #55

Merged
rbx merged 1 commit into
masterfrom
action-convention
Sep 15, 2026
Merged

rbx merged 1 commit into
masterfrom
action-convention

Conversation

@rbx

@rbx rbx commented Sep 15, 2026

Copy link
Copy Markdown
Member

No description provided.

@rbx
rbx requested a review from enlorenz September 15, 2026 09:18
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 36da8c42-8cfb-43c0-8892-6b6f77580fbe

📥 Commits

Reviewing files that changed from the base of the PR and between ee3412c and 3d37a8e.

📒 Files selected for processing (1)
  • src/environment.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a2cc3282-bda3-4aba-9ea0-39561fb8a605

📥 Commits

Reviewing files that changed from the base of the PR and between ecba559 and ee3412c.

📒 Files selected for processing (1)
  • src/environment.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

ComputeClusterEnv.step now documents action timing and clarifies that the pending-queue snapshot is captured before job launches.

Changes

Step timing documentation

Layer / File(s) Summary
Document action and queue snapshot timing
src/environment.py
Comments explain that action comes from the previous observation and that decision_pending_summary captures the queue before launching jobs.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to ee341

This PR clarifies step timing without changing runtime behavior, so it is mergeable.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided, so the description cannot be assessed for relevance to the changeset. Add a short description that explains the new comments and the action/observation timing convention they document.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: clarifying the action and observation timing convention in step().
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

Comment thread src/environment.py Outdated

def step(self, action: np.ndarray) -> tuple[dict[str, np.ndarray], float, bool, bool, dict[str, Any]]:
# Timing convention: `action` was chosen by the policy from the observation
# returned at the end of the previous step()/reset(), i.e. from hour (current_hour - 1)'s

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

However, price information is for current_hour.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

True, added a clarification.

@rbx
rbx force-pushed the action-convention branch from ee3412c to 3d37a8e Compare September 15, 2026 09:59
@rbx
rbx merged commit fd2908a into master Sep 15, 2026
4 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