Uh oh!
There was an error while loading. Please reload this page.
Fix the self-contradictory due_offset_days description - #36
Merged
Conversation
Reading A is adjudicated and shipped: due_offset_days counts days from
the anchor day, and 0 means the anchor day itself. The field's own
description contradicted this — it said "days from the anchor" and
then gave an example ("5" on a monthly period anchored to period
start = due on the 5th) that is off by one under that reading.
Rewrite the description with a worked example on each anchor in both
duty.object.ts and catalog-item.object.ts (the catalog copy must agree
with the duty copy, since #5's catalog instantiation copies this field
onto every duty it creates), and add the same worked examples to the
due_anchor + due_offset_days section of docs/product/data-model.md.
Also clarify the field label to "Offset (days, 0 = anchor day)" so the
zero-point is visible without opening the description tooltip.
No arithmetic changes: src/functions/period.ts and its pinned tests
are untouched.
Fixes#23
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqkTcrxUFci7nqXdbBSe2pos-warren
marked this pull request as ready for review
September 1, 2026 04:31
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Sep 1, 2026
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 freeto 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.
Fixes#23
Documentation-only fix. Reading A is adjudicated (see the PM comment on #23)
and shipped in
src/functions/period.ts(#1):due_offset_dayscounts daysfrom the anchor day, and
0means the anchor day itself. That arithmetic isuntouched here — the bug was the field's own description contradicting it
(
"5" with a monthly period anchored to period start = due on the 5th, whichis off by one under reading A).
What changed
src/objects/duty.object.ts— rewrotedue_offset_days.descriptionwith aworked example on each anchor:
period_start—0= first day,4=fifth day;
period_end—0= last day,-3= three days before thelast. Also changed the label from
Offset (days)toOffset (days, 0 = anchor day)so the zero-point reads without opening thedescription tooltip.
src/objects/catalog-item.object.ts— the same field, the same label anddescription. It had no description at all before this PR; it now matches
duty.object.tsverbatim, which matters because Catalog instantiation — apply a position's duty catalog to a person #5's cataloginstantiation copies cadence fields from the catalog item onto the duty —
a mismatch between the two would have replicated a contradiction onto
every duty created from a catalog item.
docs/product/data-model.md— thedue_anchor+due_offset_daysparagraph gets the same worked examples.
Explicitly not touched
src/functions/period.tsandtest/period.test.ts— the arithmetic iscorrect and adjudicated; this PR only fixes the prose that misdescribed it.
objectstack.config.tswas not touched either.Gates (all green, at a9d15af)
Generated by Claude Code