Plan #26: helpers for detecting open-ended activations - #64
Merged
Merged
Conversation
Triage found the premise holds on every read path, but a result property would cover only the get path, and the real hazard is silent: reading endTime on an open activation yields a 1970 Timestamp. Plan adds activation_is_open() and activation_end_time() as module-level helpers and fixes the cookbook recipe that prints 0 for open intervals. Refs #26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PgJ3cRwMrh8UzxzZwraLCT
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Address the two moderate test-coverage gaps and correct the stale T6 statement in the plan.
Review effort: Lite
Findings: None
What changed in this PR
This PR proposes the implementation plan for helpers that detect open-ended configuration activations and safely handle absent end times.
Changes:
- Defines
activation_is_open()andactivation_end_time(). - Plans API exports, tests, documentation, cookbook updates, and release notes.
- Documents protobuf presence semantics and the zero-timestamp hazard.
| File | Description |
|---|---|
plan/tickets/26/plan.md |
Detailed design, implementation tasks, tests, and documentation plan for issue #26. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- D3 and the cookbook tasks now cover carrying end_time forward in a full-replace re-save: end_time=current.endTime on an open record sends a zero Timestamp, which the server rejects as "endTime must be after startTime"; activation_end_time() is the correct carry-forward. - T6 no longer contradicts T1: the integration suite does assert endTime presence on responses; those assertions stay. - The find-the-open-activation recipe now settles the zero / one / many cases, grounded in dp-service's per-name-or-category overlap check and its documented non-atomic race. - Open questions carry their context and recommendation, per the plan template in CLAUDE.md. Refs #26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PgJ3cRwMrh8UzxzZwraLCT
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.
Plan for #26, submitted for review before implementation. This PR adds only
plan/tickets/26/plan.md.The ticket is AI-drafted. Triage kept its intent and changed its shape:
activation_is_open()andactivation_end_time()work on activations from get, query, iterate, and getActive. The draftedGetConfigurationActivationApiResult.is_openwould cover only get, and finding the open activation for a live bridge is usually a query.activation_end_time()returnsNonefor an open activation. Reading.endTimedirectly on an open record silently gives a 1970Timestamp.0as the end of an open interval.Open questions Q1–Q3 are resolved in the plan. The issue title and body have been updated to match.
Refs #26
🤖 Generated with Claude Code
https://claude.ai/code/session_01PgJ3cRwMrh8UzxzZwraLCT