Skip to content

D75 · v1 is still developing, so the data phase builds the v2 tables a v1 feature needs before the step that loads it

Accepted · 2026-10-26 · zuki · Partly supersedes the plan's "v1 is frozen to bug fixes", the cutover guide's T − 1 week line and D71 (when the repo work order's tables are built) · Partly superseded by D93 (Stock Opname's flow: it is no longer rebuilt as v1 has it)

Decision: v1 is not frozen. It stays in development and may gain tables, columns, permission names and features until the change stop in the cutover guide. Whatever v1 gains that v2 doesn't have, the data phase builds in the v2 backend first: the tables, columns and enums, and the permission codes, with their rules (D27) and tests, before the step that loads them and ahead of the module that will build the feature's functions and pages. Those stay in their module.

  • Stock Opname is the first case. It is a new feature. v1 already holds its tables (stock_opname_expected, 111 rows on the copy, and stock_opname_sessions, 1 row, with a third table TL-DP-03 names) and a permission, opname:write, that one login holds. v2 has no rule, table or permission code for it.

    • v2 rebuilds it as v1 has it, for now: a session counts the cars expected at a place, and each expected car is scanned or not.
    • Two permission codes, opname:read and opname:write. v1's opname:write maps onto opname:write.
    • The order: a DOC pack writes its rules, then a BE pack adds the tables and the codes to the schema, then the operations step loads v1's rows (timeline row 0g). Its functions and pages are M5's.
  • Request Repo follows the same pattern. v1's own repo feature is still in development, so v2 builds its own from the General Flow (D71, from #235) without waiting for v1:

    • repo_requests is already in the schema (row 0e, #286);
    • the repo work order, its units and its PICs move into the data phase as tables (row 0i), which D71 had left to M5;
    • their functions, the two jobs, repo_leader, repo:assign and the pages stay in M5.

    If v1 ships its repo feature before cutover, its rows load like any other v1 table.

  • A v1 feature is not a v2 spec. v2's rules still come from the decisions and from rules that merge in apps/docs (D27). What v1 does with the feature is input to those rules, not the rule.

Why: zuki, 2026-10-26: Stock Opname is a new feature; v1's tables are not frozen but dynamic and still developing; the data phase should do the necessary backend implementation first, such as creating the tables, and the same goes for Request Repo. zuki on #320, the same day: rebuild Stock Opname as v1 has it for now, in M5, with opname:read and opname:write; v1's repo is still in development, and v2 can develop its own. The access step's pull request showed it: one v1 login holds opname:write (#278), and v2 has no code for it.

Consequences:

  • The machinery already copes with a new v1 table, and a new value stops the run:
    • the snapshot copies every v1 table into legacy (R-MIG-01);
    • v2_reader reads tables made later (TL-DP-01);
    • a v1 value no step has mapped stops the night (R-MIG-02).
  • What it doesn't do is say when v1 gains a table or column no step reads. A new rule and check close that: each night the reconcile lists every v1 table and column that no step claims, until a step claims it or zuki signs it as ignored (D18). DOC writes the rule and BE the check, so v1's growth is seen the night it happens, not at cutover.
  • A night stopped by a new v1 value is not a clean night for D20's ten. That is the cost of a moving v1, and the stop is right: the report names the value, and the fix is a mapping or a rule.
  • The change stop moves to "v1 changes". The cutover guide's T − 1 week line said bug fixes stop unless critical; it now says v1 changes stop unless critical, so the last week's nights run on a v1 that no longer moves. When that week starts is zuki's to change in the guide.
  • The port log stays for bug fixes (plan). A v1 feature is an issue, not a port-log entry.
  • Unchanged: v2 is a rebuild (D2); v1 is read only through v2_reader and nothing here writes to it (D36); the gate is still met, not dated (D20).
  • The permission catalogue grows by two (opname:read, opname:write) in row 0g's schema pack, beside D63's and D71's additions, which come with M3 and M5. The seed, the E2E logins and the per-role menu check grow with them. Which system roles hold them is for the rules (row 0g).
  • Not decided here: a redesign of Stock Opname, which would be a later rule change in M5.