Skip to content

Feature/wdb module - #137

Merged
eohara-di merged 16 commits into
mainfrom
feature/wdb-module
Oct 12, 2026
Merged

eohara-di merged 16 commits into
mainfrom
feature/wdb-module

Conversation

@pkaiserq

Copy link
Copy Markdown
Contributor

No description provided.

pkaiserq and others added 2 commits September 30, 2026 10:40
…es; idb writedown-mode port

wdb:
- all four writedown modes (default, partbyattr, partbyenum, partbyfirstchar) and the
  end-of-day merge (part, col, hybrid) via di.merge
- modes saveandsort, save and sort; proctypes sort and sortworker run this module with
  settings/sort.q and settings/sortworker.q, as legacy loads wdb.q for both
- end-of-day sort, move to hdb, reloads and sortworker peach ported from legacy wdb.q;
  workers setting stands in for -s -N
- legacy upd (insert, configurable), movetohdb, clearwdbdata, manipulate, reloadproc helpers;
  filesystem calls through di.os; sort.csv defaults to $TORQXAPPCONFIG/sort.csv
- publishes .wdb.writedownmode for the idb

idb: mounts savedir or savedir/<partition> by writedown mode, as legacy; loadsym/loadidb/
loaddb, partitioncounthaschanged, clearrowcountcache, maptoint/mapfctoint at root.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- astimespan reads a string of digits as seconds, like a number ("N"$ read it as hours)
- sortparams: an empty sort config table when none is loaded, so the partitioned-mode
  sort.csv checks log instead of throwing 'type
- movetohdb creates the hdb root before the move
- setroot defines .u.end with set, not as a root key named `.u.end
- flushend flushes the reloaded processes' handles, not the keyed table's rows

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/idb/idb.q Resolved
Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/wdb/wdb.q Resolved
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

1 critical | 5 warning(s) | 3 suggestion(s)

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

Suggestions

  • di/torq/proc/idb/idb.q:41 — clearrowcountcache resets .Q.pn with set[.Q.pn;.Q.pt!(count .Q.pt)#()]. This sets .Q.pnto a list of empty lists keyed by.Q.pt. However .Q.pnis a list of row-count vectors (one per table per partition), not a list of empty lists — the shape produced here differs from what kdb+ populates.Q.pnwith after a mount, so any subsequentcountusing the cache may see malformed data. Legacy TorQ resets it with.Q.pn:()or re-mounts; using(count .Q.pt)#enlist()` (a list of empty lists, one per table-set entry) is not the documented reset idiom.
  • di/torq/proc/wdb/wdb.q:173 — handler indexes .z.m.reloadsummary by .z.w (the handle of the calling process) to record the callback. The async callback is sent via neg[wh] in reloadproc, which means the far process calls back on its own handle. Inside handler, .z.w is the handle of the process that sent the callback — that is correct. However the reloadfunc lambda sent to the remote process calls (neg .z.w)(.wdb.handler;...)from inside the remote process, so.z.wthere is the wdb's handle as seen from the remote side. The wdb then receives the message and.z.winhandleris the remote's handle. This is only correct if the handle the wdb uses to *send* to a given peer is the same integer as the handle the peer uses to call *back* — which is true for a direct hopen/hclose pair but not guaranteed across reconnects. A stale or recycled handle could indexreloadsummaryincorrectly, causingflushendnever to be reached ifcount[.z.m.reloadsummary]=.z.m.countreload` is never satisfied.
  • di/torq/proc/wdb/wdb.q:490 — After fixpartition is called, initmissingtables uses .z.m.currentpartition (set by fixpartition when the tp log date differs). But initmissingtables is called with the value of .z.m.currentpartition before the replay upd may have triggered additional fixpartition-equivalent logic. More critically, the replay runs through replayupd which calls savetab, which uses getpartition[] — but getpartition[] returns .z.m.currentpartition if non-null, which has already been set. If fixpartition moves the wdb data to tplogdate and sets currentpartition:tplogdate, then subsequent savetab calls during the subscribe replay already write to the corrected partition. This ordering is correct. However the flush threshold check on lines ~488–489 (replaymaxrowcheck[x;maxrows x] over tablelist[]) runs after subscribe has already swapped upd back to replayupd — but at this point the root upd is still replayupd (not yet reset to .z.m.upd), because setroot[] (which writes .z.m.upd to root upd) has not been called yet. Any rows remaining in memory from this post-subscribe threshold check are flushed via savetab, which is correct, but root upd remains replayupd until setroot[] runs — meaning a live tick arriving between the subscribe return and setroot[] would trigger another disk flush. This is a narrow window but a real race-free sequencing issue: setroot[] (and in particular the upd swap) should occur before the timer is started and definitely before the init log.

DI-Dexter and others added 6 commits October 8, 2026 11:19
Resolve the builtin process-type registry conflict as a union: keep the
branch's sort/sortworker entries and main's discovery entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…he suite

di.subscriptions now requires a handlers dep, so wdb's init failed for every
caller that did not pass one. A sort-mode wdb never subscribes - .z.m.subs is
only read on the save path - so move the init below the sort-mode early return
rather than widen wdb's required deps.

Test fixture:
- add a handlers mock to test.csv and test.q, needed on the save path
- eodok/feedok took the sym column with `value`, which resolves symbols as
  variable names. select resolves the on-disk enum once the sym domain is
  loaded, so with sortworker peers the column arrives as plain symbols and the
  check threw 'aapl. Take the column as-is; distinct/differ handle both types.

Suite goes from 7 failures to 71/71.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tabsizes (wdb.q:62, wdb.q:122): tablelist[] orders by bytes from tabsizes, but
only savetables populated it - savetablesbypart tracked partsizes instead. In a
partitioned writedown every table therefore ordered on zero bytes and the
largest was not flushed first. Track it in savetablesbypart too, and clear it at
end of day in every mode, not just the default one.

informgateway (wdb.q:229): an absent gateway is a normal deployment, and
informgateway runs on every end-of-day reload, so it logged an error each time.
Log it at info.

movetohdb (wdb.q:381): the per-table branch logged each failed move and carried
on, leaving tables split across the wdb and the hdb with no rollback and no
signal. A multi-table move cannot be made atomic, so fail on the first error the
way savetables does, and report a source directory left non-empty.

Tests: tabsizestracked, tabsizescleared and nogatewayquiet - each verified to
fail without the corresponding fix. Suite 74/74.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Checked the module against TorQ 5.2.19 code/processes/wdb.q, code/wdb/{origstartup,
writedown}.q, code/common/merge.q and config/settings/{wdb,sort,sortworker}.q.

endofperiod: legacy defined a log-only stub in code/wdb/writedown.q and the port
dropped it as STP-only. di.torq.proc.segmentedtp now exists and broadcasts end of
period through di.pubsub.callendofperiod, which sends the (current;next;data)
triple as ONE argument, so a subscriber without the callback fails the publish.
Define it at root, monadic.

getpartition: legacy exposed it as an overridable setting so a deployment could
decide its own partition value; the port hard-coded it. Read it from config,
defaulting to the built-in - the same pattern upd and savedownmanipulation use.

Tests: getpartitionoverride and endofperiodcallback, both verified to fail
without the fix. Suite 76/76.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… in the wdb

The callback has to exist in the process that RECEIVES the publish. di.pubsub is the
publisher half - it runs in the tickerplant and the wdb never loads it - so the default
belongs with the subscriber half, which already owns root upd and the root table schemas.
One place covers di.torq.proc.wdb, di.torq.proc.rdb and di.torq.proc.chainedtp; rdb had
the same latent failure.

Installed only when root endofperiod is not already defined, the rule chainedtp uses for
upd, so a subscriber that forwards the roll downstream keeps its own.

Tests: endofperioddefault (verified to fail without the install) and
endofperiodnotclobbered. The wdb's endofperiodcallback now covers the same path through
di.subscriptions. Suites 47/47 and 76/76.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Dropped from this PR entirely: di/subscriptions is back to main, and the wdb
keeps the stub stripped as the original port had it.

upstream/feature-segmentedtp already defines endofperiod in both the rdb and the
wdb, and that branch is where the segmented tickerplant work belongs. Two PRs
editing di/subscriptions at once would only collide.

getpartition and the review fixes are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread di/torq/servers/servers.q Resolved
Comment thread di/torq/torq.q Resolved
Comment thread di/subscriptions/subscriptions.q Resolved
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

1 critical | 10 warning(s) | 3 suggestion(s)

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

Suggestions

  • di/torq/proc/chainedtp/chainedtp.q:71 — writetolog branches on not 98h=type x to flip the data before logging, using cols[value t] to get the column names. value t where t is a symbol resolves the table from the current namespace. Inside .ctp, value t will resolve against .ctp's namespace first. If t is a root table (e.g. `trade), value tradeinside.ctpmay not find it and will error, becausevalueof a symbol looks up in the current namespace. The prior implementation usedcols[. t] (explicit root lookup). This should use cols[. t]orcols value tonly if.ctp` is certain to have no shadowing table with that name.
  • di/pubsub/pubsub.q:167 — errparse is defined inside \d .stpps and references .z.m.log, but .stpps functions are not use-loaded module code — they run in root .stpps, not in a module's .z.m namespace. .z.m.log will be undefined in this context (it is set by pubsub.init into the pubsub module's .z.m, not into .stpps's execution context). Calls to .stpps.errparse from addfiltered and selfiltered will throw 'log or silently fail. The log reference should be .stpps state accessed as a module-local variable set during .stpps.init.
  • di/pubsub/pubsub.q:194 — .stpps.init is called with a table list t but references .z.m.log in its error branch (if[count b:t where not t in tables[];{.z.m.log[error][...]} each b]). Same issue as errparse: .stpps.initruns in the.stppsnamespace context, not in the pubsub module's.z.m. The log` call will fail.

Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/idb/idb.q Resolved
Comment thread di/email/manual_tests.q Resolved
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

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

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

Suggestions

  • di/torq/proc/wdb/wdb.q:391 — handler stores the callback result in .z.m.reloadsummary[.z.w] and checks count[.z.m.reloadsummary]=.z.m.countreload to decide whether to release. However .z.m.countreload is set in doreload as the total number of handles found at that moment. If eodwaittime>0 and .z.m.countreload is 0 (no reload targets found), then doreload schedules a timer job via addjob and also calls getprocs which immediately returns having found nothing. The handler is never called, so flushend is only invoked by the timer at timeouttime. This is not a crash but reloadcomplete stays 0b for up to eodwaittime even when there is nothing to wait for. More critically, if countreload is 0 and handler IS somehow called (e.g. a stale callback), count[reloadsummary]=0 is 1b, causing premature release. The same race: countreload counts handles at the start of doreload, but if eodwaittime>0, a handle that was connected when counted but disconnects before responding is never removed from reloadsummary — the count comparison never becomes true, and flushend is only called by the timeout timer. This is legacy behaviour and by design, but countreload:0 when no processes are connected means the condition count[reloadsummary]=countreload is 0=0 → 1b on the FIRST callback from any stale .z.w, releasing early. Fix: guard if[0=.z.m.countreload;...] in doreload to call flushend immediately instead of scheduling a timeout.

di/email/manual_tests.q was swept in by a `git add -A` and has nothing to do
with this PR. Removed from the branch; it stays on disk for the email work.

idb: the port changed the sym-load error from `1_string` to `string`, so the
path printed with its leading colon. Restored, and applied to the other three
path log lines in the file so they agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@DI-Dexter

DI-Dexter commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Status

Picked this up as the original author has moved to another project.

Merge conflict resolved. main is merged in (efdf8fd); the only conflict was the builtin process-type registry in torq.q, resolved as the union of this branch's sort/sortworker and main's discovery. The diff is 16 files, all under di/torq/proc/wdb, di/torq/proc/idb and di/torq.

Suites green: wdb 75/75 (was 7 failing), idb 117/117, torq 72/72, plus chainedtp, subscriptions, merge, handlers, servers, rdb, hdb and tickerplant unchanged.

Changes on top of the original work

  • Suite repair. di.subscriptions gained a mandatory handlers dep on main, and the wdb forwards its own deps to it, so the suite broke on the merge. Root cause was that init initialised subscriptions unconditionally, before the sort-mode early return - a sort/sortworker process never subscribes (.z.m.subs is only read on the save path). Moved the init below the return rather than widening the wdb's required deps.
  • Fixture bug. eodok/feedok took the sym column with value, which resolves symbols as variable names. select resolves the on-disk enum once the sym domain is loaded, so with sortworker peers the column arrived as plain symbols and the check threw 'aapl. This also leaked -s -2, cascading into six more failures.
  • Review findings - see the resolved threads.
  • getpartition restored as an overridable setting, as legacy exposed it.

Review threads

All 20 replied to and resolved. Of the substantive findings, 6 were real and are fixed; the rest did not reproduce.

Worth flagging for whoever reads the bot's output next: the finding labelled critical (partitioncounthaschanged undefined) was incorrect - it is defined ten lines below the call site, which q resolves normally. Several others were similar.

Correction to my own earlier replies. Twelve of the resolved threads say chainedtp.q:115 and torq.q:248 "look like genuine issues against main and are worth raising separately." Having checked both, they are not:

  • chainedtp.q:115 - hclose 1i does not close stdout; it throws 'domain, and the call is wrapped in @[hclose;.u.l;()] which swallows it. No effect.
  • torq.q:248 - qlignore is a top-level module function defined at line 201, not inside initquerylog. It is resolvable and callable on a bare module load with querylog disabled. Verified at runtime.

No issues raised against main.

Why the out-of-scope comments appeared

An earlier push carried a malformed merge commit: it held the merged file content but had not recorded main as a second parent, so GitHub computed the diff against the old merge base and showed 69 files, attributing main's own 29 commits to this PR. The bot reviewed that, which is why threads appeared on clienttracking, servers, chainedtp, discovery and subscriptions - none of which this PR touches. Fixed in efdf8fd; the file content never changed (identical tree hash), only the recorded ancestry.

@eohara-di

Copy link
Copy Markdown
Contributor

I tried running the tests for wdb and got some unusual results

TL;DR the first time I ran it it threw some errors but said all tests passed, but the second time it also threw errors but showed a lot of tests failing. Could you check if this is expected?

eohara@DI-183:~/kdbx-modules$ q
KDB-X 5.0 2026.07.23 Copyright (C) 1993-2026 Kx Systems
l64/ 14()core 7684MB eohara di-183 127.0.1.1 NONEXPIRE  eoghan.ohara@dataintellect.com COMMUNITY #5032477

Welcome to KDB-X Community Edition!
For Community support, please visit https://kx.com/slack
Tutorials can be found at https://github.com/KxSystems/tutorials
Ready to go beyond the Community Edition? Email preview@kx.com

q)test:use`di.k4unit
q)a:test.moduletest`di.torq.proc.wdb
2026.10.08T18:05:37.672 start
2026.10.08T18:05:37.672 :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 75 test(s)
mv: cannot stat '/tmp/di_sort_k4unit/wdb/2026.01.15': No such file or directory
2026.10.08T18:05:39.753 end
Test results:
action ms bytes lang code                                                                                      repeat file                                                 msx bytesx  ok okms okbytes valid timestamp              
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
fail   0  0     q    wdb.init[()!();()!()]                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    wdb.init[()!();(enlist`log)!enlist mlog]                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    `init`endofday`endofdaysort`version~key wdb                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count wdb`version                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong "30000"                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    5~.m.di.0torq.0proc.0wdb.tolong enlist "5"                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong 30000                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool "true"                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0b~.m.di.0torq.0proc.0wdb.tobool "false"                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool 1b                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "10"                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "0D00:00:10"                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan 10                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong "not-a-number"                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong ""                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (@[.m.di.0torq.0proc.0wdb.tolong;"3.5";{[e] e}]) ss "3.5"                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (initerr (enlist`mode)!enlist`bogus) ss "mode must be saveandsort, save or sort"  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (initerr (enlist`mode)!enlist"bogus") ss "mode must be saveandsort, save or sort" 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
run    0  0     q    system "l di/torq/proc/wdb/test.q"                                                        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   130352  1  1    1       1     2026.10.08T18:05:37.673
run    0  0     q    setup[]                                                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 116 4194976 1  1    1       1     2026.10.08T18:05:37.789
true   0  0     q    defaultmode[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    100h=type get `.u.end                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    98h=type .m.di.0torq.0proc.0wdb.sortparams[]                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    partbyattr`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.822
true   0  0     q    partbyattr`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.834
true   0  0     q    partbyattr`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.846
true   0  0     q    partbyenum`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.871
true   0  0     q    partbyenum`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.894
true   0  0     q    partbyenum`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.910
true   0  0     q    partbyfirstchar`part                                                                      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.927
true   0  0     q    partbyfirstchar`col                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.942
true   0  0     q    partbyfirstchar`hybrid                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.959
true   0  0     q    segments[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.964
true   0  0     q    missingtables[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.969
true   0  0     q    tabsizes[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.972
true   0  0     q    manipulation[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.982
true   0  0     q    postreplay[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.991
true   0  0     q    compression[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.003
true   0  0     q    fixpartition[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.008
true   0  0     q    tpretry[]                                                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.009
true   0  0     q    pattrcheck[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.012
true   0  0     q    replaythreshold[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.015
true   0  0     q    workermerge[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.241
true   0  0     q    savemode`default                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.359
true   0  0     q    savemode`partbyattr                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.474
true   0  0     q    savemode`partbyfirstchar                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.602
true   0  0     q    handshake[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.714
true   0  0     q    syncreload[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.825
true   0  0     q    tabsizestracked[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.830
true   0  0     q    tabsizescleared[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.839
true   0  0     q    nogatewayquiet[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.847
true   0  0     q    getpartitionoverride[]                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.851
run    0  0     q    stoptp[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   544     1  1    1       1     2026.10.08T18:05:38.851
run    0  0     q    system "l di/torq/proc/wdb/testsort.q"                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   153904  1  1    1       1     2026.10.08T18:05:38.852
run    0  0     q    setupfixture[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 3   608     1  1    1       1     2026.10.08T18:05:38.855
true   0  0     q    tailok[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.863
true   0  0     q    enumintact[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.871
true   0  0     q    discovertables[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.879
true   0  0     q    defaultsavedir[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.887
true   0  0     q    workerssetting[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.891
true   0  0     q    emptypartition[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.897
true   0  0     q    nooverwrite[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.905
true   0  0     q    reloadattempted[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.916
true   0  0     q    noreload[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.925
true   0  0     q    badreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.932
true   0  0     q    idbreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.941
true   0  0     q    stringconfig[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.951
true   0  0     q    sortcsvhonoured[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.963
true   0  0     q    defaultsortcsv[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.974
true   0  0     q    initpublishes[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.978
true   0  0     q    fanoutok[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.198
true   0  0     q    workersortcsv[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.417
true   0  0     q    noworkers[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.641
true   0  0     q    workerfails[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.751
true   0  0     q    workersettings[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.753
All tests passed
q)a:test.moduletest`di.torq.proc.wdb
2026.10.08T18:06:06.695 start
2026.10.08T18:06:06.696 :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 150 test(s)
mv: cannot stat '/tmp/di_sort_k4unit/wdb/2026.01.15': No such file or directory
mv: cannot stat '/tmp/di_sort_k4unit/wdb/2026.01.15': No such file or directory
2026.10.08T18:06:10.635 end
Test results:
action ms bytes lang code                                                                                      repeat file                                                 msx bytesx  ok okms okbytes valid timestamp              
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
fail   0  0     q    wdb.init[()!();()!()]                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    wdb.init[()!();(enlist`log)!enlist mlog]                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    `init`endofday`endofdaysort`version~key wdb                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count wdb`version                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong "30000"                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    5~.m.di.0torq.0proc.0wdb.tolong enlist "5"                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong 30000                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool "true"                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0b~.m.di.0torq.0proc.0wdb.tobool "false"                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool 1b                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "10"                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "0D00:00:10"                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan 10                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong "not-a-number"                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong ""                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (@[.m.di.0torq.0proc.0wdb.tolong;"3.5";{[e] e}]) ss "3.5"                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (initerr (enlist`mode)!enlist`bogus) ss "mode must be saveandsort, save or sort"  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
true   0  0     q    0<count (initerr (enlist`mode)!enlist"bogus") ss "mode must be saveandsort, save or sort" 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.672
run    0  0     q    system "l di/torq/proc/wdb/test.q"                                                        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   130352  1  1    1       1     2026.10.08T18:05:37.673
run    0  0     q    setup[]                                                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 116 4194976 1  1    1       1     2026.10.08T18:05:37.789
true   0  0     q    defaultmode[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    100h=type get `.u.end                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    98h=type .m.di.0torq.0proc.0wdb.sortparams[]                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.811
true   0  0     q    partbyattr`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.822
true   0  0     q    partbyattr`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.834
true   0  0     q    partbyattr`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.846
true   0  0     q    partbyenum`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.871
true   0  0     q    partbyenum`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.894
true   0  0     q    partbyenum`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.910
true   0  0     q    partbyfirstchar`part                                                                      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.927
true   0  0     q    partbyfirstchar`col                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.942
true   0  0     q    partbyfirstchar`hybrid                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.959
true   0  0     q    segments[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.964
true   0  0     q    missingtables[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.969
true   0  0     q    tabsizes[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.972
true   0  0     q    manipulation[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.982
true   0  0     q    postreplay[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:37.991
true   0  0     q    compression[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.003
true   0  0     q    fixpartition[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.008
true   0  0     q    tpretry[]                                                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.009
true   0  0     q    pattrcheck[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.012
true   0  0     q    replaythreshold[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.015
true   0  0     q    workermerge[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.241
true   0  0     q    savemode`default                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.359
true   0  0     q    savemode`partbyattr                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.474
true   0  0     q    savemode`partbyfirstchar                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.602
true   0  0     q    handshake[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.714
true   0  0     q    syncreload[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.825
true   0  0     q    tabsizestracked[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.830
true   0  0     q    tabsizescleared[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.839
true   0  0     q    nogatewayquiet[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.847
true   0  0     q    getpartitionoverride[]                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.851
run    0  0     q    stoptp[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   544     1  1    1       1     2026.10.08T18:05:38.851
run    0  0     q    system "l di/torq/proc/wdb/testsort.q"                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   153904  1  1    1       1     2026.10.08T18:05:38.852
run    0  0     q    setupfixture[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 3   608     1  1    1       1     2026.10.08T18:05:38.855
true   0  0     q    tailok[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.863
true   0  0     q    enumintact[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.871
true   0  0     q    discovertables[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.879
true   0  0     q    defaultsavedir[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.887
true   0  0     q    workerssetting[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.891
true   0  0     q    emptypartition[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.897
true   0  0     q    nooverwrite[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.905
true   0  0     q    reloadattempted[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.916
true   0  0     q    noreload[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.925
true   0  0     q    badreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.932
true   0  0     q    idbreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.941
true   0  0     q    stringconfig[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.951
true   0  0     q    sortcsvhonoured[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.963
true   0  0     q    defaultsortcsv[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.974
true   0  0     q    initpublishes[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:38.978
true   0  0     q    fanoutok[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.198
true   0  0     q    workersortcsv[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.417
true   0  0     q    noworkers[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.641
true   0  0     q    workerfails[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.751
true   0  0     q    workersettings[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:05:39.753
fail   0  0     q    wdb.init[()!();()!()]                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
fail   0  0     q    wdb.init[()!();(enlist`log)!enlist mlog]                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    `init`endofday`endofdaysort`version~key wdb                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0<count wdb`version                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong "30000"                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    5~.m.di.0torq.0proc.0wdb.tolong enlist "5"                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong 30000                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool "true"                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0b~.m.di.0torq.0proc.0wdb.tobool "false"                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool 1b                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "10"                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "0D00:00:10"                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan 10                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong "not-a-number"                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong ""                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0<count (@[.m.di.0torq.0proc.0wdb.tolong;"3.5";{[e] e}]) ss "3.5"                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0<count (initerr (enlist`mode)!enlist`bogus) ss "mode must be saveandsort, save or sort"  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
true   0  0     q    0<count (initerr (enlist`mode)!enlist"bogus") ss "mode must be saveandsort, save or sort" 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.696
run    0  0     q    system "l di/torq/proc/wdb/test.q"                                                        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 1   75584   1  1    1       1     2026.10.08T18:06:06.697
run    0  0     q    setup[]                                                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 116 4194976 1  1    1       1     2026.10.08T18:06:06.814
true   0  0     q    defaultmode[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.830
true   0  0     q    100h=type get `.u.end                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.830
true   0  0     q    98h=type .m.di.0torq.0proc.0wdb.sortparams[]                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.830
true   0  0     q    partbyattr`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.835
true   0  0     q    partbyattr`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.838
true   0  0     q    partbyattr`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.843
true   0  0     q    partbyenum`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.855
true   0  0     q    partbyenum`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.865
true   0  0     q    partbyenum`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.871
true   0  0     q    partbyfirstchar`part                                                                      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.877
true   0  0     q    partbyfirstchar`col                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.884
true   0  0     q    partbyfirstchar`hybrid                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.888
true   0  0     q    segments[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:06.892
true   0  0     q    missingtables[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.897
true   0  0     q    tabsizes[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.902
true   0  0     q    manipulation[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.912
true   0  0     q    postreplay[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.921
true   0  0     q    compression[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.931
true   0  0     q    fixpartition[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       1     2026.10.08T18:06:06.936
true   0  0     q    tpretry[]                                                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.937
true   0  0     q    pattrcheck[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.940
true   0  0     q    replaythreshold[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:06.944
true   0  0     q    workermerge[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:07.155
true   0  0     q    savemode`default                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.270
true   0  0     q    savemode`partbyattr                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:07.379
true   0  0     q    savemode`partbyfirstchar                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:07.485
true   0  0     q    handshake[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.603
true   0  0     q    syncreload[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.718
true   0  0     q    tabsizestracked[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.724
true   0  0     q    tabsizescleared[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:07.728
true   0  0     q    nogatewayquiet[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.738
true   0  0     q    getpartitionoverride[]                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.742
run    0  0     q    stoptp[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   544     1  1    1       1     2026.10.08T18:06:07.742
run    0  0     q    system "l di/torq/proc/wdb/testsort.q"                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 1   91040   1  1    1       1     2026.10.08T18:06:07.743
run    0  0     q    setupfixture[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 5   608     1  1    1       1     2026.10.08T18:06:07.748
true   0  0     q    tailok[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.757
true   0  0     q    enumintact[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.765
true   0  0     q    discovertables[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.773
true   0  0     q    defaultsavedir[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.780
true   0  0     q    workerssetting[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.784
true   0  0     q    emptypartition[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.791
true   0  0     q    nooverwrite[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.798
true   0  0     q    reloadattempted[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.809
true   0  0     q    noreload[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.817
true   0  0     q    badreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.825
true   0  0     q    idbreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.833
true   0  0     q    stringconfig[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.842
true   0  0     q    sortcsvhonoured[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.857
true   0  0     q    defaultsortcsv[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.869
true   0  0     q    initpublishes[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:07.875
true   0  0     q    fanoutok[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.094
true   0  0     q    workersortcsv[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.314
true   0  0     q    noworkers[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.536
true   0  0     q    workerfails[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.645
true   0  0     q    workersettings[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
fail   0  0     q    wdb.init[()!();()!()]                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
fail   0  0     q    wdb.init[()!();(enlist`log)!enlist mlog]                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    `init`endofday`endofdaysort`version~key wdb                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0<count wdb`version                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong "30000"                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    5~.m.di.0torq.0proc.0wdb.tolong enlist "5"                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    30000~.m.di.0torq.0proc.0wdb.tolong 30000                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool "true"                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0b~.m.di.0torq.0proc.0wdb.tobool "false"                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    1b~.m.di.0torq.0proc.0wdb.tobool 1b                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "10"                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan "0D00:00:10"                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0D00:00:10~.m.di.0torq.0proc.0wdb.astimespan 10                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong "not-a-number"                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
fail   0  0     q    .m.di.0torq.0proc.0wdb.tolong ""                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0<count (@[.m.di.0torq.0proc.0wdb.tolong;"3.5";{[e] e}]) ss "3.5"                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0<count (initerr (enlist`mode)!enlist`bogus) ss "mode must be saveandsort, save or sort"  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
true   0  0     q    0<count (initerr (enlist`mode)!enlist"bogus") ss "mode must be saveandsort, save or sort" 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.653
run    0  0     q    system "l di/torq/proc/wdb/test.q"                                                        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   75456   1  1    1       1     2026.10.08T18:06:08.653
run    0  0     q    setup[]                                                                                   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 106 4194976 1  1    1       1     2026.10.08T18:06:08.760
true   0  0     q    defaultmode[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.783
true   0  0     q    100h=type get `.u.end                                                                     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.783
true   0  0     q    98h=type .m.di.0torq.0proc.0wdb.sortparams[]                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.783
true   0  0     q    partbyattr`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.788
true   0  0     q    partbyattr`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.792
true   0  0     q    partbyattr`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.795
true   0  0     q    partbyenum`part                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.799
true   0  0     q    partbyenum`col                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.805
true   0  0     q    partbyenum`hybrid                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.809
true   0  0     q    partbyfirstchar`part                                                                      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.813
true   0  0     q    partbyfirstchar`col                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.817
true   0  0     q    partbyfirstchar`hybrid                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.822
true   0  0     q    segments[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:08.826
true   0  0     q    missingtables[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.829
true   0  0     q    tabsizes[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.833
true   0  0     q    manipulation[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.855
true   0  0     q    postreplay[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.864
true   0  0     q    compression[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.874
true   0  0     q    fixpartition[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       1     2026.10.08T18:06:08.879
true   0  0     q    tpretry[]                                                                                 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.880
true   0  0     q    pattrcheck[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.885
true   0  0     q    replaythreshold[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:08.889
true   0  0     q    workermerge[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:09.102
true   0  0     q    savemode`default                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.223
true   0  0     q    savemode`partbyattr                                                                       1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:09.342
true   0  0     q    savemode`partbyfirstchar                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:09.451
true   0  0     q    handshake[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.571
true   0  0     q    syncreload[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.696
true   0  0     q    tabsizestracked[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.701
true   0  0     q    tabsizescleared[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       0  1    1       0     2026.10.08T18:06:09.707
true   0  0     q    nogatewayquiet[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.715
true   0  0     q    getpartitionoverride[]                                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.719
run    0  0     q    stoptp[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   544     1  1    1       1     2026.10.08T18:06:09.719
run    0  0     q    system "l di/torq/proc/wdb/testsort.q"                                                    1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 1   91040   1  1    1       1     2026.10.08T18:06:09.720
run    0  0     q    setupfixture[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 4   608     1  1    1       1     2026.10.08T18:06:09.724
true   0  0     q    tailok[]                                                                                  1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.732
true   0  0     q    enumintact[]                                                                              1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.740
true   0  0     q    discovertables[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.748
true   0  0     q    defaultsavedir[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.757
true   0  0     q    workerssetting[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.762
true   0  0     q    emptypartition[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.769
true   0  0     q    nooverwrite[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.776
true   0  0     q    reloadattempted[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.786
true   0  0     q    noreload[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.795
true   0  0     q    badreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.803
true   0  0     q    idbreloadorder[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.812
true   0  0     q    stringconfig[]                                                                            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.823
true   0  0     q    sortcsvhonoured[]                                                                         1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.833
true   0  0     q    defaultsortcsv[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.843
true   0  0     q    initpublishes[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:09.848
true   0  0     q    fanoutok[]                                                                                1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:10.077
true   0  0     q    workersortcsv[]                                                                           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:10.300
true   0  0     q    noworkers[]                                                                               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:10.526
true   0  0     q    workerfails[]                                                                             1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:10.635
true   0  0     q    workersettings[]                                                                          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0       1  1    1       1     2026.10.08T18:06:10.635
Test failures:
action ms bytes lang code                     repeat file                                                 msx bytesx ok okms okbytes valid timestamp              
------------------------------------------------------------------------------------------------------------------------------------------------------------------
true   0  0     q    partbyattr`part          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.835
true   0  0     q    partbyattr`col           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.838
true   0  0     q    partbyattr`hybrid        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.843
true   0  0     q    partbyenum`part          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.855
true   0  0     q    partbyenum`col           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.865
true   0  0     q    partbyenum`hybrid        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.871
true   0  0     q    partbyfirstchar`part     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.877
true   0  0     q    partbyfirstchar`col      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.884
true   0  0     q    partbyfirstchar`hybrid   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.888
true   0  0     q    segments[]               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:06.892
true   0  0     q    fixpartition[]           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       1     2026.10.08T18:06:06.936
true   0  0     q    workermerge[]            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:07.155
true   0  0     q    savemode`partbyattr      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:07.379
true   0  0     q    savemode`partbyfirstchar 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:07.485
true   0  0     q    tabsizescleared[]        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:07.728
true   0  0     q    partbyattr`part          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.788
true   0  0     q    partbyattr`col           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.792
true   0  0     q    partbyattr`hybrid        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.795
true   0  0     q    partbyenum`part          1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.799
true   0  0     q    partbyenum`col           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.805
true   0  0     q    partbyenum`hybrid        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.809
true   0  0     q    partbyfirstchar`part     1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.813
true   0  0     q    partbyfirstchar`col      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.817
true   0  0     q    partbyfirstchar`hybrid   1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.822
true   0  0     q    segments[]               1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:08.826
true   0  0     q    fixpartition[]           1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       1     2026.10.08T18:06:08.879
true   0  0     q    workermerge[]            1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:09.102
true   0  0     q    savemode`partbyattr      1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:09.342
true   0  0     q    savemode`partbyfirstchar 1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:09.451
true   0  0     q    tabsizescleared[]        1      :/home/eohara/kdbx-modules/di/torq/proc/wdb/test.csv 0   0      0  1    1       0     2026.10.08T18:06:09.707

@eohara-di

Copy link
Copy Markdown
Contributor

Btw I ran against this feature branch

DI-Dexter and others added 2 commits October 9, 2026 11:39
testsort.q creates a root table `scalls` to record mock server calls, and it is
still there when the suite finishes. tablelist[] returns every root table except
the ignorelist, so a second moduletest in the same process tried to write down
`scalls` - which has no sym column - and the partitioned writedown tests threw
'length.

`calls` was already in the ignorelist for exactly this reason; add `scalls`.

Reported by Eoghan: a second run in the same q session failed ~19 checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
emptypartition[] asks for a partition that was never written, so the mv fails -
that is the point of the check. mv writes to stderr, which q does not capture,
so the suite printed "mv: cannot stat ..." on every run and read as a problem.

Run that one call with di.os's swappable syscall wrapped to drop stderr, and
restore it afterwards. The module's own error log still fires, which is what the
check asserts, and a real shell error anywhere else is still printed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread di/torq/proc/wdb/testsort.q Resolved
@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.

The first version trapped f and returned the error as a value, so a genuine
failure inside the silenced call no longer reached the suite - the bare call it
replaced would have raised it. Restore the syscall, then re-signal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread di/torq/proc/wdb/testsort.q Resolved
@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.

@DI-Dexter

Copy link
Copy Markdown
Collaborator

hey Eoghan, thanks for catching this.

The initial run where all tests passed but there was the message mv: cannot stat '/tmp/di_sort_k4unit/wdb/2026.01.15' is expected. The emptypartition[] test asks for a partition that doesn't exist to prove the failure is logged rather than thrown

The rerun failures are a fixture leak. testsort.q creates a root table scalls for its mock server calls and leaves it behind. the wdb's tablelist[] treats every root table as data to write down, so on a second run it tries to write scalls which has no sym column and the partitioned writedown tests throw 'length. The calls root table was already in the ignorelist for the same reason, but scalls wasn't

made the fix to add scalls to the ignorelist, and silenced the shell for the move failure so the mv message doesn't appear and the second run is clean now

q)test:use`di.k4unit
q)test.moduletest`di.torq.proc.wdb
q)count select from test.getresults[] where not ok
0i
q)test.moduletest`di.torq.proc.wdb
q)count select from test.getresults[] where not ok
0i

@eohara-di eohara-di left a comment •

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.

Looks good to me, but I asked Claude to check if any functionality had been lost when porting over, and it came back with the below blurb.

TL;DR mostly ok but could you take a look at the first 2 in "Not documented":

Nothing core has been lost. Every piece of TorQ's wdb.q, wdb/writedown.q, wdb/origstartup.q and idb.q has a counterpart in the PR. That includes all four writedown modes, all three merge methods, sort-worker peach, fixpartition, initmissingtables, the eodwaittime reload handshake, the idb rollover/intradayreload, and maptoint/mapfctoint. Some behaviour has narrowed, though. The first three items below aren't covered in the docs.

PR #137's head is the same commit as your local feature/wdb-module (9c2f687). I compared it against TorQ origin/master (7e77714a). I read the code but didn't run anything.

Not documented

  1. reloadorder only works for hdb, rdb and idb types now. TorQ called root reload on any proctype in reloadorder. reloadexpr only recognises hdbtypes, rdbtypes and idbtypes. Anything else is skipped with a warning (wdb.q:491), so a custom proctype in reloadorder no longer gets reloaded at end of day.
  2. The endofperiod stub is gone, but the module STP still sends it. wdb.md:202 lists it as deprecated. However, segmentedtp.q:447 calls callendofperiod on every period roll, and that sends (endofperiod;x)to all subscribers. A wdb subscribed to an STP will get an undefined-function error every period. TorQ's one-line logging stub inwritedown.q` was what stopped that. No data is lost, but either keep the stub or stop the STP sending it.
  3. The default numtab changed. TorQ defaulted to `quote`trade!10000 50000. The module defaults to an empty dict (wdb.q:622), so quote and trade now flush at 100k rows instead of 10k/50k. This is odd because mergenumtab kept the TorQ default.

Small config gaps

  • .merge.partlimit (TorQ setting, default 1000) isn't passed to di.merge init (wdb.q:685), so it can't be changed from the wdb config.
  • settimer is now a number of seconds rather than a timespan. A TorQ-style value such as 0D00:00:10 makes tolong throw.
  • Several TorQ setting names were renamed or dropped: subtabs, subsyms, replay, tpconnsleepintv, tpcheckcycles and schema. A ported TorQ settings file that uses them is ignored without any warning.

Documented or deliberate

  • Startup waits are now bounded. TorQ retried the tickerplant (wdb) or wdb (idb) forever. The module fails init after tpwaittimeout / connecttimeoutms (30s). TorQ's idb also logged and kept running when no wdb was found; the module throws.
  • movetohdb stops at the first table that fails to move. TorQ logged the failure and carried on with the rest. Dexter made this change on purpose in 562d159. The outer error trap still lets postreplay and doreload run, so the hdb reloads with a partition split between the wdb and the hdb, which is the same situation as before.
  • IDB: registering with the wdb (.servers.registerfromdiscovery), .proc.getattributes and the root reload alias are all listed under "Not ported" in idb.md:78-85. getattributes is the one that will matter once the gateway routes on attributes.
  • Also dropped: FinSpace/AWS support, the schema:0b option (the schema always comes from subdetails), and the startup log lines describing the partition layout. The gateway is now told about reloads with an async (.gw.reload;msg)instead of TorQ's syncreloadstart[]call, which matchesdi.torq.proc.gateway`.

I'd fix 1 and 2 before merging, and either restore the old numtab default or document the new one.

…default

From Eoghan's port-parity review on PR #137. All three narrowings confirmed
against TorQ 5.2.19 before changing anything.

reloadorder: TorQ's reloadfunc called root `reload` on whatever proctype was
listed (code/processes/wdb.q, `. `reload x). reloadexpr only recognised
hdbtypes, rdbtypes and idbtypes and returned (::) for anything else, which
getprocs skipped with a warning, so a custom proctype in reloadorder was never
reloaded. The default branch is now legacy's root `reload` - which is exactly
what the rdb branch already did, so that branch collapses into it - and the
dead (::) guard is gone. customreload[] proves it with a real connected peer of
a custom proctype; it fails without this change.

endofperiod: legacy shipped a logging stub in code/wdb/writedown.q.
di.pubsub.callendofperiod broadcasts (`endofperiod;(current;next;data)) to every
subscriber on each period roll, so without the stub a wdb pointed at a segmented
tickerplant raises 'endofperiod every period. Restored and published at root.
Note it is monadic, matching callendofperiod, which sends the triple as one
argument - legacy's three-parameter stub would have been applied to one argument
and silently become a projection.

numtab: legacy defaults to `quote`trade!10000 50000 (writedown.q), the module
defaulted to an empty dict, so quote and trade flushed at numrows instead of
10k/50k. mergenumtab had kept the legacy default, so the two disagreed. Restored.
The test fixture now pins numtab/replaynumtab empty, since those tests want
numrows to govern, and numtabdefault[] covers the shipped default.

Also from the same review: partlimit is now passed through to di.merge init when
configured (omitted, di.merge keeps its own default of 1000), and wdb.md gains a
migration section for the TorQ settings that were renamed or dropped
(subtabs, subsyms, replay, tpconnsleepintv/tpcheckcycles, schema) plus the
settimer seconds-not-timespan change, which were silently ignored before.

Suite is 79 checks, green, and clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread di/torq/proc/wdb/wdb.q Resolved
Comment thread di/torq/proc/wdb/wdb.q Resolved
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

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

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

@DI-Dexter

DI-Dexter commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks Eoghan, this was a genuinely useful pass — all three of the "Not documented" items reproduced, and I've fixed all three in f3d9148. I checked each against TorQ 5.2.19 before touching anything.

1. reloadorder narrowing — fixed. Confirmed: TorQ's reloadfunc calls root `. `reload x on whatever proctype is listed, with no special-casing. reloadexpr returned (::) for anything outside hdb/rdb/idb and getprocs skipped it. The default branch is now legacy's root reload — which is exactly what the rdb branch already did, so that branch collapses into the default and the (::) guard goes away:

reloadexpr:{[ptype]
  $[ptype in .z.m.hdbtypes;{[d] .hdb.reload[]};
    ptype in .z.m.idbtypes;{[d] .idb.intradayreload[]};
    {[d] `. [`reload] d}]
  }

customreload[] covers it with a real spawned peer of a custom proctype that exposes a root reload. I checked it fails on the old code before keeping it, so it isn't a tautology.

2. endofperiod stub — restored. Confirmed di.pubsub.callendofperiod broadcasts to every subscriber, and the module wdb had no stub at all, so it raises 'endofperiod on each period roll.

One thing worth flagging, because porting legacy verbatim would not have worked: the stub has to be monadic here. callendofperiod is {(neg getallhandles[])@\:(endofperiod;x)}— it sends the(current;next;data)triple as a *single* argument. Legacy's stub is{[currp;nextp;data] ...}`, so applied to one argument it would have become a projection: no error, no log, silently nothing. The stub is monadic and logs.

That leaves a coupling on the segmentedtp rebuild: that branch keeps callendofperiod but its segmentedtp uses the new three-argument endp ((endofperiod;x;y;z)). A monadic stub will 'rank` against that, so whichever of these merges second needs the stub and the sender brought into step. Flagging rather than guessing, since that branch is yours.

3. numtab default — restored to `quote`trade!10000 50000. You were right that it was odd: mergenumtab had kept the legacy default, so the two disagreed. The test fixture now pins numtab/replaynumtab empty — three tests wanted numrows to govern and started failing once the default came back, which is the behaviour change in miniature — and numtabdefault[] covers the shipped default.

Small config gaps:

  • .merge.partlimit is now passed through to di.merge init when it's in config; omitted, di.merge keeps its own default of 1000. partlimitpassed[] covers both.
  • The renames and the settimer unit change are now documented. wdb.md has a "Migrating a TorQ wdb settings file" section covering subtabs, subsyms, replay, tpconnsleepintv/tpcheckcycles and schema, plus the fact that config comes from the merged dictionary so an unknown setting is ignored silently. That last part was the real hazard — worse than the individual renames.

Docs: wdb.md listed the endofperiod stub under "Not included (deprecated)", which is now wrong, so that section is corrected and the monadic-sender coupling is written down there too.

Suite is 79 checks, green, and still clean on a second moduletest in the same process.

Nothing done on the "Documented or deliberate" list — agreed those are either intentional or already written down.

DI-Dexter and others added 2 commits October 12, 2026 11:38
…e's default

From the second DIReview pass on PR #137.

The numtab point is fair: main ships wdb 0.2.0, which defaults numtab to an
empty dictionary, so merging this changes flush thresholds for quote and trade
on any config without a numtab key. wdb.md now carries an explicit
"Upgrading from 0.2.0" note with the way to keep the old behaviour. The
accompanying claim that the test fixture diverging from production is a footgun
does not hold - pinning a config value is what makes those tests deterministic,
and numtabdefault[] asserts the shipped default directly.

On partlimit the review suggested resolving the default in the wdb and always
passing it. That is the thing that drifts: it would put the number 1000 in two
modules. Fixed the other way instead - di.merge owns the default, wdb.md no
longer restates it, and the test asserts the fallback against
di.merge's own partlimitdefault rather than a literal.

Suite is 79 checks, green, clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…142

Audited the module against the definition-of-done checklist in the
torq-module-extraction skill (PR #142, still open). Three items did not hold.

Line length: style.md caps lines at 150 characters. Twelve lines were over,
eleven of them introduced by this branch. All are long log messages or chained
calls, now split. No behaviour change; the suite is unchanged at 79 green
before the new test below.

init idempotency: the checklist asks that init be idempotent where it
registers anything. It registers a timer job, and di.timer raises on an id
that already exists (init.q:31), so a second init threw. Fixed with the
delete-then-add the end of day path already uses for sortflushend, rather than
introducing a registered flag - same outcome, consistent with the surrounding
code, no extra state.

This needed a test to be worth anything. The fixture's timer mock is a pair of
no-op lambdas and never detected a duplicate, so initidempotent[] installs a
mock that mirrors di.timer and calls init twice. Removing the guard makes it
fail.

deps validation: a non-dict deps reached `key deps` and raised a bare 'type
rather than saying what was wrong. init now checks the type first and names
what it wants, which is the pattern the skill gives and what di.email already
did.

Left alone deliberately: the two direct .z.* assignments, .z.zd for
compression and .z.pd for the sort workers. That rule is about event handlers
going through the injected handlers dependency; neither of these is an event
handler and no contract covers them.

Suite is 80 checks, green, and clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread di/torq/proc/wdb/test.q Resolved
@DI-Software-Engineering

Copy link
Copy Markdown

DIReview Summary

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

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

@eohara-di
eohara-di merged commit 644bd91 into main Oct 12, 2026
@eohara-di
eohara-di deleted the feature/wdb-module branch October 12, 2026 13:26
alowrydi added a commit that referenced this pull request Oct 14, 2026
- #141 (toml retry/pubinterval): already carried here; keep this branch's
  versions, plus main's servers.md wording.
- torq.q builtin dict: main's sort/sortworker plus tickerlogreplay/segmentedchainedtp.
- wdb.q: main's full port, with this branch's subscription path reapplied:
  .sub.subscribe via .sub.getsubscriptionhandles, fixpartition on sd`d (skipped
  on re-init, when .sub.subscribe returns ()), root endofday dyadic for the
  segmented tickerplant, triadic endofperiod stub, .u.end unchanged.
- wdb tests: fake tickerplant answers as a segmented one, found through a real
  di.torq.servers; config merges settings/default.q; freshwdb clears
  .sub.SUBSCRIPTIONS; end of day driven through .u.end; endofperiodstub sends
  three arguments. No expected values changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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