Repository navigation
Feature framework polishing - #147
Conversation
getdailyadjustment read .z.p twice, so the data-timezone offset drifted by nanoseconds between the two reads and was never exact. It now reads the clock once. Tests assert an exact +9h offset for Asia/Tokyo (no DST). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
addfiltered read the condition column `filts`, but TorQ's pubsub.q and the port's own .ps.subtablefiltered send `filters`, so filtered subscriptions on the tickerplant path were silently unfiltered. addfiltered and subscribestrfilter now use `filters`. Tests cover the parsed where clause and column list, filtered delivery, and rejection of an invalid filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- getextrapartitiontype returns () after logging when neither the table nor default has a p# row, as legacy does, instead of the logger's return value. - mergebypart reads segments unprotected (get each partchunks): an unreadable segment fails the batch before anything is upserted. - mergebypart's upsert handler logs ERR and then re-signals the error. - checkenumerabletype logs ERR and then signals for a non-enumerable column. - mergehybrid no longer re-sorts the whole destination and applies p#; the callers apply p# after merging, as in TorQ. Its tests and docs go with it. A failed merge now stops end of day before the segments are deleted; a wdb caller-level test (failedmerge) covers this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e as TorQ's .timer.repeat - init requires a `log dependency in its dict; the (::) config form is gone. The only non-test caller, di.torq buildtimerdep, now passes the log dep. - Single trap, as TorQ's timer.q: execute no longer traps, so a job's error reaches runandschedule's handler (jobfailed), which logs ERR with the job id and error whatever debug is set to, and returns 0b. - gateway gwtimeout/gwrmqueries/gwrminactive, wdb wdbsave and torq querylogflush move from mode 1 to mode 3 (reschedule from the end of the previous run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rQ's timer D-T1: addjob.custom stores (),params and upserts a keyed row, so a job with an atom parameter no longer types the params column. D-T2: a job whose next run would fall after maxtime is disabled after its run, as TorQ's timer checks the next run against the period end. D-T3: nextruntime is recomputed after each run instead of every tick, as TorQ's timer does, so a job added after the table empties still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…timer.removefunc addjob.once schedules a one-off job at a set time (startattime, maxruns 1). removefunc deletes every job running a function with given parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… trackservers.q reqproctypesnotconn and the two root projections on startupdepcyclestypename, alongside the existing startupdepnamecycles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in di/torq/proc/gateway/test.csv: both sides added a block after the export checks. Kept both - the timer-mode check from this branch, then main's late-backend registration tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The suite wrote to fixed /tmp/diconfig* directories, so on a shared host it failed in setup when another user owned them and ran no rows. Fixtures now live under /tmp/diconfig_<pid>/, built from TD, and are removed after the run. Test logic is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n timing; migrate callers As TorQ's timer.q, which the port is moving to: - period is a timespan, as .timer.repeat takes it; addjob rejects any other period type, and any mode outside the scheduling modes, before the job is stored (a stored bad row stopped the scheduler on every tick) - a job with the same function and parameters as an existing one is rejected unless dupcheck is 0b; dupcheck defaults on, as repeat/once - modes 1-3 first run: an unset start runs now, a past start aligns forward on its period (no catch-up burst); once is due at its runtime as given - a description column and opts key - mode 5 buckets on the period's minutes Callers in subscriptions, torq, logroll, housekeeping (dupcheck 0b, as legacy housekeeping.q:157), gateway, chainedtp, servers, tickerplant, segmentedtp, wdb and dataaccess pass timespans in the same commit, so no commit breaks. Their test mocks record timespans. timer, servers, subscriptions, logroll and asyncdispatch docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
q consumes its own -t, so cmdlinet reads it from the full command line .z.X, once, and init stamps it into config as timerms (ms, null if not given). The tickerplants batch on it as TorQ's .z.ts runs at -t, without reading the command line themselves - the same env-free boundary as processcsv. Tests launch real processes through torqx_init.q with and without -t. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stpzts job's period was fixed at 1s. It now follows config timerms (q's -t, stamped by di.torq), falling back to 1000ms when -t is unset or 0, as legacy segmentedtickerplant.q does. segmentedchainedtp gets the same period. Test peers start with -t 200, -t 0 and -t 300. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ainedtp The whole-seconds guard existed only because di.timer took integer seconds. TorQ registers publishalltables with any timespan pubinterval (chainedtp.q:209-210); the port now does too, in timer mode 2 (legacy 1h). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tickerplant.q publishmode and pubperiod are removed (breaking for port-format settings). As TorQ's classic tickerplant, the tickerplant batches every -t ms when q is started with -t (config timerms, stamped by di.torq) and publishes each update immediately otherwise. The end-of-day check stays its separate 1s job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- savedownmanipulation and postreplay, as TorQ's .save hooks, configured
through init and set only when passed (TorQ #762's intent); postreplay
defaults to {[d;p]}, avoiding the 'rank that #762's projection causes in
legacy
- savedown and appenddown apply manipulate before enumerating; failures are
logged and the original rows written, as .save.manipulate
- the built-in default is TorQ's config/sort.csv: p# on sym, sorted by sym
then time
wdb's sort-mode test expectations change because of the new default sort
(sym then time, p#); its sortcsvhonoured test now uses a time-only csv so it
still proves an override.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otected, as TorQ's wdb The private manipulate and trapped postreplay go; wdb passes its config's savedownmanipulation and postreplay (defaulting as TorQ's wdb.q:78-79) to di.dbwrite and calls its manipulate and postreplay. As legacy wdb.q:334, a failing postreplay now propagates out of end of day after the move, leaving currentpartition on the old date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d from .replay.* at init The load-time .save.manipulate and root .save.savedownmanipulation / .save.postreplay go; init reads .replay.savedownmanipulation and .replay.postreplay (defaulting as TorQ's tickerlogreplay.q:40-41), passes them to di.dbwrite, and the replay calls its manipulate and postreplay. Hooks set after use and before init are now honoured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he standalone clear; postreplay unprotected, as TorQ's rdb init passes the config's savedownmanipulation and postreplay (defaulting as TorQ's rdb.q:42-43) to di.dbwrite, ahead of the tickerplant wait as legacy reads its hooks at load. Standalone end of day captures the in-memory attributes before the save, reapplies them after the clear, then calls postreplay unprotected before the hdb reload, as legacy rdb.q:104-118. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… export single-file compress With -s below 0, compressfromtable peaches one table to each worker process, which compresses and verifies it there, as TorQ #732; the final state is unchanged. compress is exported for single-file use, as legacy housekeeping's kdbzip calls .cmp.compress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… skips directories, as TorQ's housekeeping The job csv is read as legacy housekeeping.q:44-51: function,path,match, exclude,age,agemin,checkfordirectory, the last two named by position and optional, rows with a null function or age skipped and logged. The actions are TorQ's rm, zip and tardir. rm on a matched directory is skipped and logged as an error, as legacy's rm -f fails on one. kdbzip stays out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bytype and the addprocscustom hook, as TorQ's trackservers Ports trackservers.q:130-134 (addh), :255-258 (refreshattributes), :97-107 (getserverbytype, gethpbytype, and root .servers.gethandlebytype, which reopens dead handles first, unlike the module export), and the addprocs hook .servers.addprocscustom (:244-247), kept if already defined. serverselect.md is included for the note that its getserverbytype and gethpbytype share these names but read its own server pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s TorQ's .eodtime settings getrolltimezone, getdatatimezone and getrolltimeoffset return the settings init applied, which legacy callers read as .eodtime.rolltimezone, .eodtime.datatimezone and .eodtime.rolltimeoffset (e.g. dataaccessutils.q:11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rQ's .proc.getconfig getconfig[builtinroot;approot;path;level] returns the config file(s) for a path, app before builtin, at TorQ's levels 0/1/2 (torq.q:149-174); getconfigfile is level 0. Pure: the roots are arguments, as cascade. Legacy's $KDBSERVCONFIG tier has no port equivalent and is not searched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de, as TorQ's torq.q di.torq reads -parentproctype (torq.q:376-380) as a reserved flag and stamps it into config as a symbol atom. cascade takes it before proctype, so its settings tier sits between default and proctype (torq.q:593), and loadappcode loads code/<parentproctype>/ between common and the proctype, gated by loadprocesscode (torq.q:643). One commit for both modules, since cascade's new argument would otherwise break di.torq's call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys rejecting .gw.getdata is now the gateway's own wrapper over di.dataaccess's getdata, behind the same reload helper (ineod) as asyncexec/asyncexecjpt, so it is rejected during an EOD reload instead of being dispatched to the rdb and hdb mid-reload. The reloadstart log line says it rejects new queries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as TorQ's checkeod During a reload, ineod rejects only a query spanning more than one server type, as legacy's checkeod (gateway.q:93); a single-type query runs. A getdata's types are those of the partitions its range covers, from the same table di.dataaccess routes with. The test fixture now uses OS-assigned ports and checks each listener is the process it spawned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test-only. Ports a spawned peer binds are reserved by a q started with -p 0W that writes its port and exits, instead of probing for a port with no listener; each spawn logs to the per-run fixture dir and checks the listener's .z.i is the pid it spawned. FIXDIR is per run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as TorQ's tickerplant.q As legacy tickerplant.q:50-51 (batched: the check sits in the branch that stamps unstamped data) and :70 (immediate: ts .z.p on every upd), upd now runs the roll check before logging. Before, only the 1s tpeodcheck job rolled, so messages between the roll time and the next check were logged into the old day (24 rows, up to 462ms late, in the TorqX-POC probe; none after this change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… wdb and rdb upd, savedownmanipulation and postreplay are read from the config dict in init, so a launched process can set them in its .q settings file. Legacy reads them as .replay.upd / .replay.savedownmanipulation / .replay.postreplay under \d .replay (TorQ tickerlogreplay.q:25,40-41); here they were read from those root names at load, before any settings file could set them. Breaking: root .replay.upd, .replay.savedownmanipulation and .replay.postreplay are no longer read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… p# default Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…boolean adcfg amended synccallsallowed into enlist[`log]!enlist deps`log, whose values are a one-row table, so it arrived as `info`warn`error!111b and asyncdispatch's syncexec check would throw 'type. Join it, log first, as segmentedtp.q:29. From #128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary0 critical | 3 warning(s) | 4 suggestion(s)
Suggestions
|
|
The changes looks good, i think there are just a few small outstanding items:
|
The fixture stamped today's row at 10:00 UTC, so a getdata over midnight..now excluded it before 10:00 and the suite failed. Rows are now at midnight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary0 critical | 1 warning(s) | 1 suggestion(s)
Suggestions
|
Thanks, all three are fixed on the branch, plus one more of the same kind.
Each has failing-before tests. Counts on the tip: tickerplant 70/70, segmentedtp 85/85, di.subscriptions 49/49, gateway 39/39. |
# Conflicts: # di/torq/proc/gateway/gateway.q # di/torq/proc/gateway/test.q
DIReview Summary0 critical | 2 warning(s) | 6 suggestion(s)
Could not be posted inline
Suggestions
|
…unset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary0 critical | 1 warning(s) | 0 suggestion(s)
|
…entries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary0 critical | 1 warning(s) | 0 suggestion(s)
|
…set and names what it searched Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary✅ No new findings at
|
Summary
Restores TorQ behaviour in existing KDB-X framework modules, porting TorQ (@4be4fc3) literally, except where the sections below list a difference. What each commit carries:
~match in separate q processes, exists only for timer, rdb, housekeeping, gateway, compression, eodtime and getconfig. The tickerplants, wdb, dbwrite, servers, pubsub and merge were compared with legacy by reading its source. The tickerplants, wdb, rdb and tickerlogreplay were also run in TorqX-POC.4a23758and4c507a2are test-only,ae3d204is a merge of main, and4f150edandf628a50are doc fixes.875e34fgetdailyadjustmentreads the clock once, so the data-timezone offset is exactcc5aac6addfiltered/subscribestrfilterread thefilterscolumn TorQ sends; filtered subscriptions on the tickerplant path were silently unfiltered1187c80merge.qfailure and attribute behaviour0d460cb.timer.repeat16d7232paramsstored as a list;maxtimeend bound;nextruntimerecomputed only after a run0f7d914addjob.onceandremovefunc0cc02d3startupdepcyclesandstartupdependentae3d204gateway/test.csv, both test blocks kept4a23758d3ee4b46298ab5-tinterval into config astimerms20b45a7-tms, as TorQ's.z.tsbd5442fpubinterval51745be-tdecides batched or immediatec7d74136e7cf94postreplayunprotected6f2bbbf389f56b)aac042ag#kept after the standalone clear;postreplayunprotected59abed1compressexported99a4b72rmskips directories3a12e2faddh,refreshattributes,gethpbytype, rootgethandlebytype, theaddprocscustomhook (serverselect.md note included)3370059f97837agetconfigandgetconfigfileover the two roots84bad6e-parentproctypetier for settings and app code (one commit:cascade's new argument)4941b05getdatabehind the EOD reload gate5e8b444checkeod4c507a26cdfcd1updrolls the day first when past the roll, as TorQ'stickerplant.q:46,51,68,70(TorqX-POC finding F1)389f56bupd,savedownmanipulationandpostreplayfrom config, as wdb and rdb (TorqX-POC finding F7)4f150edwdb.mdsortcsvfallback is the sym-then-timep#default, not "time asc"f628a50dbwrite.mdbuilt-in default is the sym-then-timep#default, not "time ascending"2143e10rolltimezone/datatimezone/rolltimeoffsetreach di.eodtime intact; any of them stopped the tickerplant starting (from #128)ee3ea38synccallsallowedreaches di.asyncdispatch as a boolean, not a dict (from #128)Breaking changes
initrequires thelogdependency (0d460cb) and errors without it; the(::)config form is gone.d3ee4b4): adding a job with the same function and parameters as an existing one is now rejected, as legacyrepeat/once. Calls that used to add a duplicate fail; passdupcheck:0bto allow it.addjobperiod must be a timespan (d3ee4b4). An integer period now throwsperiod must be a timespan. This applies to every caller, external ones included. All callers in this repo are migrated, but app code is not: the TorqX-POC feed (code/processes/feed.q:160) passed seconds and failed init until changed to0D00:00:01*period. Any app callingaddjobwith an integer period breaks the same way.99a4b72). A port-format csv (action,path,match,exclude,age,unit,dirs, actionsgzip/tar) is no longer read. The process still starts, but every run logscannot read job csv: ... incorrect layoutand does nothing. Convert tofunction,path,match,exclude,age,agemin,checkfordirectorywith actionsrm/zip/tardir.publishmodeandpubperiodare removed (51745be). No error is raised: the keys are no longer read, and q's-tdecides (batched every-tms, immediate otherwise). A process that relied onpublishmode=batchedwithout-tnow publishes immediately.389f56b):upd,savedownmanipulationandpostreplayare read from config keys atinit; main read root.replay.upd/.replay.savedownmanipulation/.replay.postreplayset beforeuse, and those are no longer read. A launched process sets them in its settings file (a.qfile; TOML can't hold functions).cascadetakesparentproctypebeforeproctype(84bad6e); direct callers must pass it (a null symbol for none).Required TorqX-POC changes (TorqX-POC
feature-framework-polishing,8b213b4)The matching POC branch goes into TorqX-POC
mainon its own. It includes the.qsettings twins beside every.toml(c977801). It carries the changes below in54a8731;8b213b4adds only awdb1settings comment fix. Running the POC against this branch needs:code/processes/feed.q:160:period→0D00:00:01*period(feed1 fails init without it; observed in the smoke test);appconfig/housekeeping.csvconverted to TorQ's format (without it housekeeping logs an error each run and does nothing; observed against the old csv).54a8731also drops the stalepublishmodeline fromappconfig/settings/tickerplant1.q/.toml, which nothing reads any more.Behaviour changes reviewers should know about
di.timer (
0d460cb,16d7232,0f7d914,d3ee4b4)initrequires thelogdependency (see Breaking changes).timer.q: a job's error reachesrunandschedule's handler, which logs it at ERR with the job id; a failing job doesn't stop the other jobs in the same tick.gwtimeout/gwrmqueries/gwrminactive, wdbwdbsaveand torqquerylogflush: they reschedule from the end of the previous run, as.timer.repeat.maxtime: a job whose next run would fall after its end time is disabled after it runs.nextruntimeis recomputed only after a run; before, a job added after the jobs table emptied never ran.addjob, for internal and external callers alike (see Breaking changes).dupcheck:0b.onceis due at its runtime.di.merge (
1187c80):getextrapartitiontypereturns()after logging when there's noprow;mergebypartreads segments unprotected; upsert failures and non-enumerable columns log ERR then signal;mergehybridno longer re-sorts or appliesp#(callers do, as TorQ); a failed merge stops end of day before segments are deleted.di.torq / tickerplants (
6298ab5,20b45a7,bd5442f,51745be,2143e10)-tonce from.z.X(q consumes-t) and stamps it astimerms. The tickerplants batch on it, as TorQ's.z.ts; with no-t(or-t 0) they use 1000ms, as legacy. The batch phase can be up to one\ttick later than legacy; the rate matches.pubintervalis accepted. Known difference: the port's first batch runs atinit, legacy's onepubintervallater (legacy's timing from its source,.timer.rep[.proc.cp[];…]aligning a just-past start forward; not executed); the init-time batch publishes nothing while the tables are empty.pubintervalrounds up to the timer tick, as in TorQ: a 500ms job gave the same gaps under TorQ'stimer.qand di.timer, 500/600ms at a 100ms tick and 600ms at TorQ's default 200ms tick.2143e10):eoddepsamended keys intoenlist[`log]!enlist logdep, a one-row-table-valued dict, so each added value became a row of the log dict and anyrolltimezone/datatimezone/rolltimeoffsetsetting stopped init with'type. Now built by joins,logfirst, assegmentedtp.q:29. In the TorqX-POC, tickerplant1 with a New York roll, Tokyo data and a 1h offset failed init before; after, it starts with a 9h adjustment and a 05:00 UTC roll.publishmodeandpubperiodare removed; as TorQ,-tdecides (batched every-tms, immediate otherwise). A classic tickerplant that was set toimmediate, started with-t 200, now batches every 200ms, as legacy.upd(6cdfcd1): as TorQ,updrolls the day first when past the roll: always in immediate mode, and for unstamped data in batched mode. Feed-stamped batched data is left to the 1stpeodcheckjob, as legacy. Before, every mode relied ontpeodcheck, and the TorqX-POC logged 24 rows up to 462ms after the roll into the old day's log; after, 0, with the roll 2.4ms after the roll time.di.dbwrite and its writers (
c7d7413,6e7cf94,6f2bbbf,aac042a)savedownmanipulationandpostreplay, as TorQ'sdbwriteutils.q, configured throughinit; each is set only when passed, so a laterinitkeeps it (#762's intent). The defaultpostreplayis{[d;p]}, a deliberate difference from TorQ: it avoids the'rankthat #762's projection causes in legacy.config/sort.csv: every writer without a sort csv sorts by sym then time withp#on sym. A table withoutsymlogs a sort and an attribute error each end of day, as legacy. (All TorqX-POC tables,packetsincluded, havesymandtime; the smoke test logged no sort errors.)postreplayerror trap is dropped, as legacywdb.q:333; a failing hook stops end of day after the move and leavescurrentpartitionon the old date, as legacy.updcome from config atinit, as wdb's and rdb's do; before, root.replay.*names were read, which a launched process can't set beforeinit(app code loads after it). Proved in the TorqX-POC: asavedownmanipulationinsettings/tickerlogreplay1.qdoubled every replayed price (1337 rows; ratio 2.0, 1.0 before). The root.save.*copies are gone..save.*; backlog).postreplayruns unprotected after the save, clear and attribute reapply and before the HDB reload, as legacyrdb.q:118.g#is kept after the standalone clear, as legacyrdb.q:104,115. The dbwrite setup moved ahead of the tickerplant wait (it reads only config, the log dependency andTORQXAPPHOME). Differential r1-r5: state matches legacy; r1/r2 differ only by legacy's #762'rankand log wording.di.compression (
59abed1): with worker processes (-sbelow 0), each worker compresses and verifies one table, as TorQ #732; performance only, the final state is the same.compressis exported for single files; it writesfile_kdbtempzipand leaves the original, as legacy. TorQ's caller is housekeeping'skdbzip(housekeeping.q:64), not ported; see residuals.di.torq.proc.housekeeping (
99a4b72)function,path,match,exclude,age,agemin,checkfordirectory, the last two by position and optional, so TorQ's 5-column csv loads; nullfunction/agerows skipped and logged); the actions are TorQ'srm,zip,tardir. TorqX-POC's csv is converted (POC54a8731).rmon a matched directory is skipped and logged, as legacy'srm -ffails on one. Under dry-run it is reported as if it would remove it (di.osisdirunder dry-run; backlog; legacy has no dry-run).wrapper eachstops at the first error. Differential, seven cases (k1–k5, k7, k8): on-disk state matches for k1–k5 and k7; k8 (a csv naming a root function) differs by design.di.torq.servers (
0cc02d3,3a12e2f)startupdepcycles/startupdependent,.servers.addh,.servers.refreshattributes,.servers.getserverbytype/.servers.gethpbytypeand root.servers.gethandlebytype(which reopens dead handles first; the module's exportedgethandlebytypedoesn't), astrackservers.q.addprocscalls.servers.addprocscustom[res;procs](a no-op by default, kept if already defined).getserverbytype/gethpbytypeshare names with di.serverselect's, which read its own server pool..servers.*names in TorQ'sapidetails(handlers/apidetails.q:26-35:SERVERS,opencon,addh,addw,addnthawc,getservers,gethandlebytype,gethpbytype,startup,refreshattributes) are defined as root.servers.*names once the module is initialised (checked atf628a50).startupdiffers in signature (see residuals).di.eodtime (
3370059): addsgetrolltimezone,getdatatimezone,getrolltimeoffset(legacy callers read.eodtime.rolltimezone/datatimezone/rolltimeoffset, e.g.dataaccessutils.q:11). They have no ported caller yet: the port's dataaccess has noreadtableproperties.getdaystays internal (not inapidetails). Differential: settings,danddailyadjmatch legacy.di.torq.config (
4a23758,f97837a,84bad6e)getconfig[builtinroot;approot;path;level]/getconfigfile, as.proc.getconfig: app before builtin, levels 0/1/2; pure. No ported caller yet. Differential against legacy's own source: 24 of 24 match.-parentproctype, astorq.q:376-380,:593,:643: a reserved flag stamped into config as a symbol atom; its settings tier sits betweendefaultand the proctype;code/<parentproctype>/loads betweencommonand the proctype, gated byloadprocesscode. A process launched with-parentproctype wdbnow inherits an appwdb.qtier and loadscode/wdb/first; before, the flag was ignored. (Unit tests only; see the open gaps.) Breaking for directcascadecallers: it takesparentproctypebeforeproctype(null for none).di.torq.proc.gateway (
4941b05,5e8b444,ee3ea38)getdatais now behind the EOD reload gate, through the same helper asasyncexec/asyncexecjpt; before, it was dispatched to the rdb and hdb mid-reload.checkeod; agetdatacounts as the server types of the partitions its range covers (g1 now matches legacy).getdatawas compared by source, not executed (it needs TorQ's dataaccess stack); its routing ends in.gw.asyncexecjpt/.gw.syncexecjt, whose reload behaviour was measured.synccallsallowed(ee3ea38): it was amended into a one-row-table-valued dict aseoddepswas, so it reached di.asyncdispatch as`info`warn`error!111bandsyncexec's check would throw'type. Now joined,logfirst.Testing
origin/main(0901741) against4c507a2, run one at a time; the suites6cdfcd1and389f56btouch were rerun at389f56b(tickerplant, tickerlogreplay), with wdb and dbwrite rerun for the doc fixes, and tickerplant, gateway, eodtime, asyncdispatch and torq rerun for2143e10/ee3ea38. Every suite that differs gains tests and nothing else; the remaining failures also occur on main (kx.logrows, and suites that fail on main too).Per-suite counts, main against tip
/tmpfixture, fixed in4a23758); the 8 failures arekx.logrows (KX module not installed here)kx.logfailuresee3ea38's 4 rows: 37/39 before the fix6cdfcd1's 10 rows: 57/61 before the fix;2143e10's 4 rows: 61/65 before the fix389f56breplaced the.replay.*rows with config rows: 93/96 before the fix, theupdrow showing the default in useEvery other suite has the same count on both, including the failures that also occur on main (asyncutil 17, datadog 11, cache 4, dataloader 3; analytics and pqx run 0). di.clienttracking ran 0 on the tip in the batch because the main run left its fixed-port peers up; on its own it's 44/44 on both.
~match: timer, rdb (r1-r5), housekeeping (k1–k5, k7, k8), gateway (g0-g3), compression (two workers), eodtime, getconfig. Results match legacy except where noted in the behaviour sections above.TorqX-POC evidence
End-of-day smoke test on the tip: full stack started per the README, data flowing, end of day forced on stp1.
2026.10.20into the HDB, and hdb, rdb and idb reloaded (3 of 3); the gateway gotreloadstart/reloadend.p#on sym, time sorted within sym; no working partition left.Connection refusedwhile the stack starts.period must be a timespan): POC app code passed integer seconds toaddjob. Fixed in the POC (feed.q:160, POC54a8731).TorqX-POC findings run (POC
feature-framework-polishing), aimed at finding defects. Observed by the author in the stack: batching (-ton stp1 and tickerplant1, chainedtppubinterval), timers, end of day (rdb, wdb, hooks), gateway queries during the reload,getconfig, a servers dependency started late (found through discovery), and compression at-s 0. Housekeeping ran against a scratch fixture with the module, not housekeeping1 in the stack. It found F1 and F7 (fixed above), F0 and F6 (backlog), and F2–F5 plus a failing wdbpostreplay(kept legacy behaviour, below).F1 in the POC: see the classic tickerplant item above (24 late rows before, 0 after).
F7 in the POC: see the tickerlogreplay item above (price ratio 2.0 with the hook in
settings/tickerlogreplay1.q).Scenario 10, two consecutive ends of day on the segmented stack at
389f56b(stp1 → sctp1 → rdb1/wdb1 → hdb, plus idb1, gateway1, housekeeping1, feed1). Every process loaded modules from the389f56bworking tree (QPATHread from each). Roottableswere unchanged on all 10 processes across every probe. Before and after each end of day:sortflushend(4 → 5 at the first, 5 → 5 at the second);.Q.w[]used flat; rdb1 drops at each reload (1,323,952 → 1,204,784; 1,326,448 → 1,197,440);.z.Wcounts unchanged on every process;currentpartition10.22 → 10.23 → 10.24,tabsizesempty after each;This stack doesn't contain F1 or F7, so it shows the rest of the stack at the tip, not those fixes.
Classic tickerplant through two consecutive rolls at
389f56b(discovery1 → tickerplant1 immediate → chainedtp1). A probe sent one quote every 20ms (320 in all) and set a roll 2s ahead twice:.z.W(3 and 3) and open files (11 and 11) identical before, between and after the rolls; roottablesunchanged.Claim-by-claim smoke test in the TorqX-POC (at
f628a50; tickerplant1's timezone run and thestartupdependentrun at2143e10/ee3ea38):dupcheck 0ballows it); a past start aligned forward on its period;onceran once;removefuncremoved only its job; a throwing job disabled and logged through the injected logger; a description stored; all 33 jobs on 10 processes have timespan periods-t, 500ms batches with-t 500; stp1 batches at-t 200; chainedtp1 accepts a 500mspubinterval(rounds up to the tick, as TorQ)p#savedownmanipulationapplied once,postreplayonce per end of day (once per log file in replay),p#sym, sorted sym then timeg#rm/zip/tardiracted;rmon a directory skipped and loggedcompresswrites only<file>_kdbtempzipand leaves the original, as TorQaddh,gethpbytype,startupdepcycles(error after its cycles),startupdependent(blocked until the hdb started),refreshattributes, theaddprocscustomhook-parentproctype wdbtier andcode/wdb/on a non-sort process;getconfiglevels 0/1/2 andgetconfigfilegetdataanswered, multi-type rejectedpartandmergereplay merged into ap#table; filtered subscription delivered only matching rows and columns; merge failure paths covered by unit tests onlyKept legacy behaviour found in the POC (not changed; legacy by reading its source, not by running TorQ)
subscriptions.q:155-157).stplog.q:112-115).symbreaks compression. TorQ's default sort leaves a 0-bytesymfile, and compression's-19!on it aborts the whole run (reproduced in q). Legacy applies the attribute the same way (dbwriteutils.q:60-66).-snegative with no workers makes compression recurse until'stack(observed). Legacy has the same line (#732).postreplaystrands the next day's data (observed in the POC with a throwing hook; asserted by the wdbfailedpostreplaytest). The partition is moved but no reload is sent,tabsizesisn't cleared, andcurrentpartitionstays on the old date, so the next day's flushes go to the old date's working directory untilfixpartitionor a restart. Legacy calls it unprotected (wdb.q:334) and setscurrentpartitiononly at the end.segmentederrorlogfilestill open). End of day closes onlylogtabs, the data tables, and the error log is reopened each day (TorQstplog.q:232,253,265; portstplog.q:198,215,225).Open gaps in the POC testing
.servers.refreshattributes[]: re-registered gateway1 with discovery1 in the POC. Discovery logs nothing for a register; discovery1'sSERVERSrow for gateway1 kept its handle and itsstartp/lastpmoved to the call time (13:02:26 → 13:02:46).-s -2: shown with two workers on a copy of an hdb partition, not the live hdb (one table per worker, gzip level 6, data reads back equal).g#after a standalone rdb's clear: kept through classic tickerplant1 → chainedtp1; the segmented path strips attributes, as TorQ does (segmentedtickerplant.q:37).-parentproctype: tier andcode/wdb/loading shown on a non-sort process (housekeeping with-parentproctype wdb; the proctype tier still wins). A real sort process still can't start (F6).startupdependentwith a late dependency: connected in the POC with discovery; mechanism not isolated. gateway1 blocked onstartupdependent[`hdb;1]with the hdb down and returned with a live hdb connection once it started, though a dead hdb row was inSERVERS.Residual differences from legacy (backlog, not in this PR)
reloadendand errors those in flight atreloadstart; the port rejects them and lets in-flight ones finish. Sized: gateway hold-and-replay ~15 lines, a di.asyncdispatchfailinflightexport ~10, and forgetdataan explicit-client entry point in di.dataaccess ~6.kdbzipnot ported (legacy leaves the original plus an_kdbtempzipcopy every run; not inapidetails; unused by TorQ's and the starter pack's csv); csv functions must be built-ins or registered withaddaction; an unmatched{in a path is left alone..servers.startup[](niladic) throws'type(run against the initialised module at389f56b); the port'sstartuptakes a config dict. No caller in this repo or TorqX-POC uses the niladic form (grep).openconlogs every failed connection (legacy only withDEBUG), predating this PR.$KDBSERVCONFIGtier is not searched (two roots).onlyclearsaved,savetables,gcflags and smallest-table-first save order not ported (TorQ sets them only to their defaults; the starter pack doesn't). Hook names: rdb config keys vs legacy.save.*; tickerlogreplay config keys vs legacy.replay.*(a TorQ settings file that sets.replay.*would need a compatibility layer).paramsis the argument list (di.timer convention).merge.q:51).Backlog found during this work
isdir/isfileare wrong under dry-run:issymlinkruns through the dry-run stub, so every path reads as a symlink. Port-only (legacy.oshas no dry-run).Address already in use), and once another process answered on the port. Gateway and servers suites now use OS-assigned ports with a listener check (30/30 runs each); clienttracking still uses fixed ports.likethrows'nyiwith 3 or more*in a pattern.startupdepcycles/startupdependentnever reconnect aprocess.csvdependency that was down at the first attempt (legacy behaviour, kept; by source, and see the open gaps for what the POC showed).torqx.shtakes-tas its tmux flag (torqx.sh:348), so q's-tcan't be passed through it; the POC's-truns used a hand-built command. Its own launcher change.sort/sortworkerprocesses can't start through di.torq. The dependency audit requiresdi.subscriptions, whichwdb/deps.toml:4declares but sort mode never loads. Dropping it fromdeps.tomlwould weaken the audit for the normal wdb, so it needs its own change.hdb/2015.01.07holds only trade (loader1 rewrites it); forcing an end of day by hand needs.stplg.getnextendUTC[]aftersetnextroll(observed; legacy cachesnextendUTCthe same way, by source).clt:first key .z.W), on main too.