Skip to content

#484 W1-W3 on the time model: wirings of an epoch group, repeat build option - #594

Merged
jesshaley merged 8 commits into
V2from
claude/wiring-epoch-groups
Dec 3, 2026
Merged

jesshaley merged 8 commits into
V2from
claude/wiring-epoch-groups

Conversation

@jesshaley

Copy link
Copy Markdown
Collaborator

Builds DID-matlab #484's three remaining items, W1–W3, on the time model only (did2.convert.timeModel()). Decided by Jess Haley, 2026-12-02 (did-schema did_v2_go_forward_class_audit.md):

  • W1 [a wiring names its epoch group through its time] (with [wiring recorded once])
    • resolveEpochProbemap keys a probe's connected to (RO:0002170) wiring by (session, probe, system, channels), no longer by epoch.
    • A wiring held for two or more epochs is timed by a time whose frame_id is the standing group of those epochs, with origin_relation RO:0002092 "happens during" and no reading. No new field goes on the relation.
    • A wiring held for one epoch keeps that epoch's anchor as its time. This is my reading of the decision (a set of one is the epoch itself), for the team to confirm.
  • W2 [one epoch group per distinct epoch set]
    • groupWirings makes one entity of type Group (NCIT:C43359) per (session, sorted epoch ids). Its id is a did2.convert.contentId of them, so a re-run gives the same id. It is named from the epoch strings (epochs t0w1, t0w2).
    • Each epoch is member_of (RO:0002350) the group, by a content-id relation.
    • New counters, each with a census_digest row: wiring_relations_grouped, wiring_epoch_groups_minted, wiring_group_memberships.
    • The round trip (+roundtrip/private/manifestProbemap) finds an epoch's wirings through its anchor and, on the time model, through the times framed by its groups (new private epochGroupTimes).
  • W3 [repeat is a schema field and a build option]
    • did2.build.timeReference takes 'Repeat' {count, period, gap}. period and gap are seconds or time cells. The checks:
      • a repeat needs a start;
      • at least one of period and gap;
      • count is a whole number ≥ 1;
      • with both and a seconds reading, period = (end − start) + gap.
    • No migrator writes it; v1 holds no repeat.

Today's schema is unchanged: one wiring per epoch, timed by its anchor, and the new counters stay 0.

Tests

  • testResolveEpochProbemap, on both schemas:
    • identical wirings in two epochs: one wiring, one group, two memberships, the same group id on a re-run, both manifests round trip;
    • two probes on one epoch set share one group;
    • a one-epoch wiring keeps its anchor.
  • testBuildTimeRepeat: the option is written and checked on the time model, and refused today (did2:build:noTimeModel).

CI: the quick and builder workflows read did-schema claude/wiring-epoch-groups, a mirror of #449's head (the time model, the datetime leaf, and start/end as a time/datetime choice). Test code reads did-schema main.

Not built here: NDI-matlab's side of W1–W3.



Generated by Claude Code

… option

Decided by Jess Haley, 2026-12-02 (did-schema
did_v2_go_forward_class_audit.md; tracked in #484), built behind
did2.convert.timeModel():

W1 [a wiring names its epoch group through its time]: resolveEpochProbemap
keys a probe's `connected to` wiring by (session, probe, system, channels),
not by epoch ([wiring recorded once]); a wiring held for two or more epochs
is timed by a time framed by the standing group of those epochs
(origin_relation RO:0002092, no reading); no new field on the relation. A
wiring held for one epoch keeps its epoch's anchor.

W2 [one epoch group per distinct epoch set]: groupWirings makes one entity of
type Group (NCIT:C43359) per (session, sorted epoch ids), its id a content id
of them (a re-run gives the same id), named from the epoch strings; each
epoch is member_of (RO:0002350) it. Counted: wiring_relations_grouped,
wiring_epoch_groups_minted, wiring_group_memberships (census_digest rows).

The round trip (manifestProbemap) finds an epoch's wirings through its
anchor and, on the time model, through the times framed by its groups
(new private epochGroupTimes).

W3 [repeat is a schema field and a build option]: did2.build.timeReference
takes 'Repeat' {count, period, gap} (seconds or time cells; a start needed;
at least one of period and gap; with both, period = (end - start) + gap).
No migrator writes it.

Today's schema is unchanged: one wiring per epoch, timed by its anchor.
Tests: testResolveEpochProbemap (grouping on both schemas, two probes on one
set, one epoch), testBuildTimeRepeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
…ilder job fails on a filtered test, run 47127950444)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
jesshaley pushed a commit that referenced this pull request Dec 3, 2026
…layout

Flat-layout follow-up (did-schema #414; [flat document layout is the
target], Jess Haley, 2026-11-30). On a flat schema did2.build writes a v2
document with its id at `id` and no class blocks (#589), and +convert and
+validate read the documents they built back as `x.base.id` and
`x.<block>.<field>`. On did-schema `main` nothing changes: every accessor
reads the nested shape as before.

- did2.document.blockOf(doc, block): the public form of +build's private
  blockView (which now calls it): the block of a nested document, the
  document itself when flat and the class is in its chain.
- did2.document.setIdOf(doc, id): writes `id` on a flat document, `base.id`
  otherwise. Used where a built document is re-id'd (jMethodSteps,
  epochMint's epoch time).
- `<expr>.base.id` reads in +convert and +validate become
  did2.document.idOf(<expr>) (mechanical; assignments left alone, v1 reads
  included since idOf reads `base.id` on a nested document), and the guards
  `isfield(x, 'base') && ... isfield(x.base, 'id')` become
  `~isempty(did2.document.idOf(x))`.
- +validate/pipelineMembers reads `entity` and `directed_relation` through
  blockOf.

Files other open PRs edit are not touched (#585, #594, #595:
resolveEpochProbemap, timeReference and the time-cell writers, jCalculation
and the #585 tuning files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
… fixed

- resolveEpochProbemap: the epoch groups, their memberships and times were
  appended to newBodies, which is indexed alike with newGroupAnchor /
  newGroupAc / newGroupClock (quick run 47129469636: index out of range at
  the appended loop). They are now validated with the wirings and emitted
  once with a surviving wiring that names their time.
- epochGroupTimes / manifestProbemap: unique() of an empty cell is 0x1, so a
  for-loop over it ran once with nothing; the lists are kept as rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
…ound trip on both schemas

The two-epoch fixture's manifests named navigator nav_1, not the rig's, so no
rig read their files and the inverse found no rows (quick run 47132078352).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
timeReference.m: #595's did2.build.timeValue writes the reading cells, so
the local dateCell is dropped (no caller); this branch's repeatBlock and
timeCell (the 'Repeat' option, #484 W3) are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema #449 (7f3991ef) types interaction.time_reference.value.start/end as
["time", "datetime"] with no fields of their own, so the schema-copy helper
removes `fields` only where an end still declares them (run 47188442803:
rmfield of a missing field).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
@jesshaley
jesshaley marked this pull request as ready for review December 3, 2026 21:14
@jesshaley
jesshaley merged commit 9b494d6 into V2 Dec 3, 2026
13 checks passed
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.

2 participants