The hours and the minutes of the current time, %subdt(%time: *hours) and *minutes, stay refused until their probe is captured #809

Manually merged
binjovi-bot merged 1 commit from lsubdt into trunk 2026-11-17 00:54:31 +00:00
Owner

The hours and the minutes of the current time, %subdt(%time: *hours) and *minutes, stay refused until their probe is captured

Minutes = %subdt(%time: *minutes) and Hours = %subdt(%time: *hours) fail in runtimeSummary: typedReads
skips a time buffer (width != 8), so the read of two zoned digits that follows _QRNX_TIME_DTZ has no rule.
An earlier build of this branch added the rule (0 -> *HOURS, 3 -> *MINUTES) from a development program, with
no public probe. A review refused that: a rule needs a red test on a public probe written for its family, and a
wrong emit is worse than a refusal. This change keeps the refusal and pins it.

Status: the family probe is not captured

pub400.com has not answered since about 09:30Z on 2026-11-15 (nc -z -G 5 pub400.com 449 fails with
Network is unreachable from the Mac, while 1.1.1.1:443 and github.com:443 answer; host-probe.sh prints
host: no answer (NetworkUnreachable)). The battery requests/lsubdt/subdt (41 cases) is written and not
captured, and no committed twin has a %subdt(%time: ...) statement (h-now2 has %subdt(%timestamp(): ...),
lr3-subdt-time-secs and lr3y-time-inz-subdt read a time field). So no fact about the 8 bytes of a time rests
on a capture, and rpg_source_stmt.zig is unchanged.

What changed

  • src/rpg_source_stmt_time_test.zig: two tests, each red against the earlier rule and green on trunk.
    • A read of two digits at offset 0 or 3 of the time buffer, after the call and the write of the public twin
      lr2-time-now, has no rule (the summary is null, so the statement keeps its failure line).
    • A read of the time buffer next to a second read, a + %HOURS(1) step, a - %MINUTES(1) step or a blank pad
      has no rule. The earlier rule emitted all four (%SUBDT(%TIME(): *HOURS) * 100 + %SUBDT(...), the two
      steps, and %CHAR(%SUBDT(%TIME(): *HOURS)) for the pad): the loop over the reads accepted any number of them
      and runtimeSummary accepts a step or a pad beside a time call, and no capture shows that those recompile to
      the one _QRNX_TIME_DTZ call they were taken from.
  • No code change: src/core/rpg_source_stmt.zig equals trunk.

Capture request (for the lane that finds the host up)

Capture only the two cases the rule needs, not the 41-case battery (about 41 minutes):

mkdir -p ~/data/sourcerer-loop/requests/lsubdt/subdt-core
cd ~/data/sourcerer-loop/requests/lsubdt
cp subdt/tn-h.rpgle subdt/tn-m.rpgle subdt-core/
jq '.cases |= map(select(.id == "lsubdt-tn-h" or .id == "lsubdt-tn-m"))' subdt/manifest.json > subdt-core/manifest.json
capture.sh ~/src/wt/sourcerer-lsubdt ~/data/sourcerer-loop/requests/lsubdt/subdt-core/manifest.json \
  ~/data/sourcerer-loop/captures/lsubdt-subdt-core

Then adopt tn-h and tn-m (%subdt(%time(): *hours) and *minutes into packed(9:0)), commit the captures
under src/testdata/savf/SC-ILE/EXPERIMENTS/, and write the rule from the statement text that the recovery emits
for them: one read of the two digits at the offsets that the captures show, a test that asserts the emitted line
of each twin, and the refusals above kept for a second read, a step and a pad until a capture shows them. The
cases tn-s, tn-m-i, tnf-*, tf-*, df-* and the c-* controls decide the facts that stay refused
(seconds, a time field, a *USA, *EUR or *JIS buffer, a date field in another format).

Refused (unchanged)

  • %subdt(t: *hours) and *minutes of a time field under timfmt(*hms:). The program converts the field
    to an *ISO work area with _QRNX_DT_CVT and reads the digits from %CHAR(field: *ISO). runtimeSummary
    refuses a %CHAR( of a conversion whose source is not *ISO (s19). Relaxing that site is not enough:
    Emitter.charRead and subdtRead (rpg_source.zig) take a value that is exactly one digit read, and a
    program may read two in one expression (%subdt(t: *hours) * 100 + %subdt(t: *minutes)). subdtRead is
    also where the field gets its time type (addNew). The fix is in rpg_source.zig, outside this change.
  • The seconds, the hours and minutes of a *USA, *EUR or *JIS time field, the digits of a date field in a
    non-ISO format and every %CHAR(date: fmt) of such a field keep their failure line.

Measured

Development program dev5 p2 (a fit measure, not a test), base v0.1.522 against this build (host Debug build of
this branch): failure lines 44 to 44 (222 lines of emitted source on both sides), and the emitted source is byte for byte the same. No
statement changes, because the code is the code of trunk.

Gate

== a. development emits (dev-hash)
p1 same
p2 same
p3 same
p4 same
p5 same
== b. L10-test direction
L10-test unchanged
== c. committed twins (emit-bytes-diff)
emit-bytes-diff: identical
== d. captures (capture-emit-diff)
capture-emit-diff: 39 cases, 0 changed, 3 with no failure line in the head emit
== e. source agreement (agree)
suspect        base=83 head=83
conflict       base=0 head=0
params_wrong   base=14 head=14
decl_missing   base=82 head=82
decl_extra     base=27 head=27
type_unmarked  base=48 head=48
== f. host round trips (both binaries)
cases to round-trip: 3
l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-1 base=match head=match
l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-4 base=match head=match
l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-5 base=match head=match
gate: PASS
# The hours and the minutes of the current time, `%subdt(%time: *hours)` and `*minutes`, stay refused until their probe is captured `Minutes = %subdt(%time: *minutes)` and `Hours = %subdt(%time: *hours)` fail in `runtimeSummary`: `typedReads` skips a time buffer (`width != 8`), so the read of two zoned digits that follows `_QRNX_TIME_DTZ` has no rule. An earlier build of this branch added the rule (`0 -> *HOURS`, `3 -> *MINUTES`) from a development program, with no public probe. A review refused that: a rule needs a red test on a public probe written for its family, and a wrong emit is worse than a refusal. This change keeps the refusal and pins it. ## Status: the family probe is not captured pub400.com has not answered since about 09:30Z on 2026-11-15 (`nc -z -G 5 pub400.com 449` fails with `Network is unreachable` from the Mac, while `1.1.1.1:443` and `github.com:443` answer; `host-probe.sh` prints `host: no answer (NetworkUnreachable)`). The battery `requests/lsubdt/subdt` (41 cases) is written and not captured, and no committed twin has a `%subdt(%time: ...)` statement (`h-now2` has `%subdt(%timestamp(): ...)`, `lr3-subdt-time-secs` and `lr3y-time-inz-subdt` read a time field). So no fact about the 8 bytes of a time rests on a capture, and `rpg_source_stmt.zig` is unchanged. ## What changed - `src/rpg_source_stmt_time_test.zig`: two tests, each red against the earlier rule and green on trunk. - A read of two digits at offset 0 or 3 of the time buffer, after the call and the write of the public twin `lr2-time-now`, has no rule (the summary is null, so the statement keeps its failure line). - A read of the time buffer next to a second read, a `+ %HOURS(1)` step, a `- %MINUTES(1)` step or a blank pad has no rule. The earlier rule emitted all four (`%SUBDT(%TIME(): *HOURS) * 100 + %SUBDT(...)`, the two steps, and `%CHAR(%SUBDT(%TIME(): *HOURS))` for the pad): the loop over the reads accepted any number of them and `runtimeSummary` accepts a step or a pad beside a time call, and no capture shows that those recompile to the one `_QRNX_TIME_DTZ` call they were taken from. - No code change: `src/core/rpg_source_stmt.zig` equals trunk. ## Capture request (for the lane that finds the host up) Capture only the two cases the rule needs, not the 41-case battery (about 41 minutes): ``` mkdir -p ~/data/sourcerer-loop/requests/lsubdt/subdt-core cd ~/data/sourcerer-loop/requests/lsubdt cp subdt/tn-h.rpgle subdt/tn-m.rpgle subdt-core/ jq '.cases |= map(select(.id == "lsubdt-tn-h" or .id == "lsubdt-tn-m"))' subdt/manifest.json > subdt-core/manifest.json capture.sh ~/src/wt/sourcerer-lsubdt ~/data/sourcerer-loop/requests/lsubdt/subdt-core/manifest.json \ ~/data/sourcerer-loop/captures/lsubdt-subdt-core ``` Then adopt `tn-h` and `tn-m` (`%subdt(%time(): *hours)` and `*minutes` into `packed(9:0)`), commit the captures under `src/testdata/savf/SC-ILE/EXPERIMENTS/`, and write the rule from the statement text that the recovery emits for them: one read of the two digits at the offsets that the captures show, a test that asserts the emitted line of each twin, and the refusals above kept for a second read, a step and a pad until a capture shows them. The cases `tn-s`, `tn-m-i`, `tnf-*`, `tf-*`, `df-*` and the `c-*` controls decide the facts that stay refused (seconds, a time field, a `*USA`, `*EUR` or `*JIS` buffer, a date field in another format). ## Refused (unchanged) - **`%subdt(t: *hours)` and `*minutes` of a time field under `timfmt(*hms:)`.** The program converts the field to an *ISO work area with `_QRNX_DT_CVT` and reads the digits from `%CHAR(field: *ISO)`. `runtimeSummary` refuses a `%CHAR(` of a conversion whose source is not *ISO (s19). Relaxing that site is not enough: `Emitter.charRead` and `subdtRead` (`rpg_source.zig`) take a value that is exactly one digit read, and a program may read two in one expression (`%subdt(t: *hours) * 100 + %subdt(t: *minutes)`). `subdtRead` is also where the field gets its time type (`addNew`). The fix is in `rpg_source.zig`, outside this change. - The seconds, the hours and minutes of a `*USA`, `*EUR` or `*JIS` time field, the digits of a date field in a non-ISO format and every `%CHAR(date: fmt)` of such a field keep their failure line. ## Measured Development program dev5 p2 (a fit measure, not a test), base v0.1.522 against this build (host Debug build of this branch): failure lines 44 to 44 (222 lines of emitted source on both sides), and the emitted source is byte for byte the same. No statement changes, because the code is the code of trunk. ## Gate ``` == a. development emits (dev-hash) p1 same p2 same p3 same p4 same p5 same == b. L10-test direction L10-test unchanged == c. committed twins (emit-bytes-diff) emit-bytes-diff: identical == d. captures (capture-emit-diff) capture-emit-diff: 39 cases, 0 changed, 3 with no failure line in the head emit == e. source agreement (agree) suspect base=83 head=83 conflict base=0 head=0 params_wrong base=14 head=14 decl_missing base=82 head=82 decl_extra base=27 head=27 type_unmarked base=48 head=48 == f. host round trips (both binaries) cases to round-trip: 3 l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-1 base=match head=match l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-4 base=match head=match l10-scout2b/l10-danlong005-openrpg/l10-danlong005-openrpg-5 base=match head=match gate: PASS ```
The hours and the minutes of the current time (%subdt(%time: *hours) and
*minutes) have no public probe yet, so no rule reads them: every read of the
8-byte time buffer stays refused, as on trunk. Two tests pin the refusal (one
read, and a second read, a step or a blank pad beside it), red against a rule
that read offsets 0 and 3. The capture request for tn-h and tn-m is in the
change fragment.
sean force-pushed lsubdt from 90a5422ada to 742b9dd234
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-17 00:36:08 +00:00
Compare
binjovi-bot manually merged commit 742b9dd234 into trunk 2026-11-17 00:54:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!809
No description provided.