Skip to content

pass through date param in callendofday - #118

Merged
jprgrant merged 1 commit into
mainfrom
fix-callendofday
Aug 6, 2026
Merged

pass through date param in callendofday#118
jprgrant merged 1 commit into
mainfrom
fix-callendofday

Conversation

@jprgrant

@jprgrant jprgrant commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread di/pubsub/pubsub.q
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

1 critical | 0 warning(s) | 0 suggestion(s)

⚠️ Spec check skipped — tracker lookup failed (NO_REF_FOUND). Standards axis only.

@jprgrant
jprgrant merged commit 1202823 into main Aug 6, 2026
Comment thread di/pubsub/pubsub.q

/ broadcast to all subscribers upon end of period, client needs to define endofperiod function
callendofperiod:{(neg getallhandles[])@\:`endofperiod`};
callendofperiod:{(neg getallhandles[])@\:(`endofperiod;x)};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the previous function we defined the variable, whereas, for this one we used the implicit. Would it be better to use the same format for both?

alowrydi added a commit that referenced this pull request Aug 18, 2026
TorQ's code/common/pubsub.q:19 broadcasts (`endofperiod;x;y;z) and both of
its subscribers - code/rdb/endofperiod.q and code/wdb/writedown.q:52 - are
{[currp;nextp;data]}. Ours was {(neg getallhandles[])@\:(`endofperiod;x)},
which failed two ways at once, both measured:

  callendofperiod[c;n;d]  ->  'rank, so a caller following that contract
                              could not call it at all
  callendofperiod[c]      ->  a ternary subscriber is left PARTIALLY
                              APPLIED. q returns a projection, the body
                              never runs, and nothing throws, logs or
                              comes back to say so.

Same defect class as the callendofday bug fixed in #118.

callendofday deliberately stays UNARY. TorQ sends (`endofday;x;y), but the
second argument is processdata, which legacy's own rdb never reads and the
shipped .u.end alias passes ()!() for - di.rdb's endofday is unary to
match. Fixing it "for symmetry" would projection-ise every unary
subscriber, so the asymmetry is documented in pubsub.md rather than left
looking like an oversight.

15 regression rows added. Negative control: against the unary version they
fail exactly 3 - the ternary call on 'rank, plus both subscriber
assertions - and nothing else.
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.

4 participants