feat(actions)!: declare the effort columns, and settle task vs action - #5
Merged
Merged
Conversation
A GLPI comment corresponds to an EasyVista TASK, not an action. Actions carry
effort and cost, so a timeline mirrored without that distinction imports
time-tracking and workflow rows as conversation. This makes the distinction
expressible on the read side.
BREAKING: ELAPSED_TIME, TIME_COST, CONTRACTUAL_COST, START_DATE_UT and
END_DATE_UT move from extra="allow" extras to declared fields on Action.
action.ELAPSED_TIME now raises AttributeError (use action.elapsed_time), the
keys leave model_extra, and a by-alias dump yields int/Decimal/datetime rather
than str. A dependant pinned >=0.2.0,<0.3 must widen deliberately, which is the
point: the retyping can change an answer silently rather than raise.
The "" sentinel and "0" stay different answers -- None for "", 0 and
Decimal("0.00") for the zeroes -- because collapsing them destroys the only
signal saying whether a record tracks effort at all. Costs parse from the API's
decimal comma into exact Decimals; a grouping separator or three-or-more
fraction digits is refused rather than guessed at, since '1.234,56' and
'1,234.56' are the same amount under opposite conventions. Magnitude is not a
trigger. None on these columns is ambiguous -- the default list_actions row
omits all five, so None there means "not projected", not "does not apply".
Adds Action.is_workflow_generated (WORKFLOW_ID set; clean on 1500/1500 measured
rows) and deliberately NO is_task(). No column examined says which route created
a record, and the effort-shape heuristic is refuted in both directions: 39 of 49
public comments carried a non-empty ELAPSED_TIME, one with a real TIME_COST,
while 173 workflow rows carried an empty one. Which action types count as
conversation is per-deployment policy and stays with the caller.
Records as tier 2, on two 2025.3 deployments, that /requests/{rfc_number}/tasks
is POST-only with no task read route under any spelling -- so create_task
returns an Action and there is deliberately no list_tasks. Side finding, tier 4:
ACTION_LABEL_* is the workflow STEP's label, not the action type's name.
Also adds scripts/tests/test_no_private_instance_identifiers.py. Preparing this
release put a real preprod hostname into docs/vendor-api-reference.md --
tracked, public, and shipped in the sdist -- with all five gates passing,
because none of them reads prose. Both a push and a PyPI upload are
irreversible, so the check is now mechanical. It stores SHA-256 digests rather
than a plaintext needle list: a grep guard must contain its needles, and the
first draft of this one published the hostname it existed to protect, in a
module exempted from its own check. With digests it needs no exemption and
scans itself.
Version 0.3.0. Corrects the CHANGELOG compare links, which pointed at a v0.2.0
tag that does not exist, and docs/publishing.rst, which ordered a v-prefixed tag
the repository has never used. The tag defines a version; the prose is corrected
to match the tags.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
==========================================
- Coverage 98.94% 98.86% -0.09%
==========================================
Files 37 37
Lines 2091 2116 +25
==========================================
+ Hits 2069 2092 +23
- Misses 22 24 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
BREAKING: ELAPSED_TIME, TIME_COST, CONTRACTUAL_COST, START_DATE_UT and END_DATE_UT move from extra="allow" extras to declared fields on Action. action.ELAPSED_TIME now raises AttributeError (use action.elapsed_time), the keys leave model_extra, and a by-alias dump yields int/Decimal/datetime rather than str. A dependant pinned >=0.2.0,<0.3 must widen deliberately, which is the point: the retyping can change an answer silently rather than raise.
The "" sentinel and "0" stay different answers -- None for "", 0 and Decimal("0.00") for the zeroes -- because collapsing them destroys the only signal saying whether a record tracks effort at all. Costs parse from the API's decimal comma into exact Decimals; a grouping separator or three-or-more fraction digits is refused rather than guessed at, since '1.234,56' and '1,234.56' are the same amount under opposite conventions. Magnitude is not a trigger. None on these columns is ambiguous -- the default list_actions row omits all five, so None there means "not projected", not "does not apply".
Adds Action.is_workflow_generated (WORKFLOW_ID set; clean on 1500/1500 measured rows) and deliberately NO is_task(). No column examined says which route created a record, and the effort-shape heuristic is refuted in both directions: 39 of 49 public comments carried a non-empty ELAPSED_TIME, one with a real TIME_COST, while 173 workflow rows carried an empty one. Which action types count as conversation is per-deployment policy and stays with the caller.
Records as tier 2, on two 2025.3 deployments, that /requests/{rfc_number}/tasks is POST-only with no task read route under any spelling -- so create_task returns an Action and there is deliberately no list_tasks. Side finding, tier 4: ACTION_LABEL_* is the workflow STEP's label, not the action type's name.
Version 0.3.0. Corrects the CHANGELOG compare links, which pointed at a v0.2.0 tag that does not exist, and docs/publishing.rst, which ordered a v-prefixed tag the repository has never used. The tag defines a version; the prose is corrected to match the tags.