Skip to content

Commit 509902a

Browse files
Merge pull request #163 from brownjuly2003-code/docs/g2-s8-followup-cleanup
G2 S8 follow-up: probe-count fact fix, narration node-label correction, provenance/currency tails
2 parents 3564664 + 879b39e commit 509902a

15 files changed

Lines changed: 32 additions & 26 deletions

‎.github/workflows/backup.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
INSERT INTO "{schema}".orders_v2 VALUES
6565
(?, ?, ?, ?, ?, CURRENT_TIMESTAMP)
6666
''',
67-
[f"ORD-{schema.upper()}-001", f"USR-{schema.upper()}", "confirmed", 42.0, "USD"],
67+
[f"ORD-{schema.upper()}-001", f"USR-{schema.upper()}", "confirmed", 42.0, "RUB"],
6868
)
6969
finally:
7070
conn.close()

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ audit-closure sprint:
183183
ClickHouse), PII protection moves from the removed app-level string-parse
184184
gate to engine-enforced vault governance (fail-closed column grants,
185185
per-jurisdiction officer roles, row policies, `SQL SECURITY DEFINER`
186-
views — 32/32 live adversarial probes), plus the vendored NL→SQL
186+
views — every live adversarial probe green), plus the vendored NL→SQL
187187
generation engine (LangGraph, routed through GraceKelly), the DV2 raw
188188
vault on PostgreSQL with `LISTEN`/`NOTIFY` freshness, the MinIO-backed
189189
PyIceberg catalog, and the OpenSSF Scorecard channel (5.8 → 7.0).

‎docs/architecture.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ See [Architecture Decision Records](decisions/) for detailed trade-off analysis.
184184
> string parse in the serving tier. **Executed 2026-07-02 (ADR 0006 Phase 2):**
185185
> `warehouse/agentflow/dv2/governance/` — fail-closed column grants for `dv2_analyst`,
186186
> per-jurisdiction `dv2_pii_officer__<branch>` roles, row policies on `hub_customer`,
187-
> `SQL SECURITY DEFINER` MDM views, PII-free `customer_360`; verified live 32/32
188-
> (`docs/perf/vault-pii-governance-verify-2026-07-02.md`). `sql_guard` remains, scoped
187+
> `SQL SECURITY DEFINER` MDM views, PII-free `customer_360`; verified live, 29/29
188+
> probes on the current script (`docs/perf/vault-pii-governance-verify-2026-07-03.md`).
189+
> `sql_guard` remains, scoped
189190
> to what it can actually enforce: SELECT-only, no DML, the tenant table allow-list, and
190191
> the recursive-CTE shadow reject. Tracked in `road-to-9.8.md`.
191192
>

‎docs/clickhouse-cutover-plan.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ actually carry PII.
8282
- [x] Verify: the 3 historical bypass forms (COLUMNS-expr, whole-row struct-ref,
8383
column-rename-list) are dead at the engine — `COLUMNS` resolves to real
8484
columns and hits the missing grant (`ACCESS_DENIED`); the other two are
85-
not expressible on ClickHouse at all (`UNKNOWN_IDENTIFIER`). 32/32
85+
not expressible on ClickHouse at all (`UNKNOWN_IDENTIFIER`). All 29
8686
adversarial probes green on a live 26.7 server, incl. jurisdiction
8787
row-scoping and admin-unaffected checks:
88-
`docs/perf/vault-pii-governance-verify-2026-07-02.md`.
88+
`docs/perf/vault-pii-governance-verify-2026-07-03.md`.
8989
- ~~Introduce a schema-execution check for the PII gate~~ /
9090
~~Reclassify the app-level gate~~ — obsolete: the app-level gate was removed
9191
with the serving PII layer (2026-07-01); there is no app-side PII surface

‎docs/decisions/0006-fix-demo-serving-engine-on-clickhouse.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ Concretely:
109109
`marts.customer_360`. The separate schema-execution app check became moot
110110
when the app-level gate was removed with the empty serving PII surface:
111111
access control on resolved columns *is* the engine ground-truth. Verified
112-
live, 32/32 adversarial probes:
113-
`docs/perf/vault-pii-governance-verify-2026-07-02.md`.
112+
live, 29/29 adversarial probes:
113+
`docs/perf/vault-pii-governance-verify-2026-07-03.md`.
114114
- The semantic layer **keeps emitting DuckDB-flavored SQL** and relies on
115115
`ClickHouseBackend._translate_sql` to transpile — this stays a deliberate,
116116
documented layer rather than an accident. Making the semantic layer emit

‎docs/domain.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ renames. The two exceptions are listed in §5.4.
209209
| Change | Scope | Status |
210210
| ------ | ----- | ------ |
211211
| Former external-dataset record_source prefix → `mp__*` (+ governance SQL, officer probes, admission tests) | The prefix carried the name of a retired public benchmark dataset that the demo loader once replayed as transaction history. Under the legend it is the **consolidated marketplace feed**, and the prefix says so. The dataset and its loader have since been removed from the codebase entirely (see CHANGELOG.md) | **Done** (B2) |
212-
| Demo value repin: currencies to `RUB` (primary), `AED`/`KZT` in branch stories; demo revenue/counts consistent with §1–2 | `contracts/entities/order.yaml` currency examples, NL demo answers, seeded `ORD-*` rows | Planned (data phase, after the generator spec) |
212+
| Demo value repin: currencies to `RUB` (primary), `AED`/`KZT` in branch stories; demo revenue/counts consistent with §1–2 | `contracts/entities/order.yaml` currency examples, NL demo answers, seeded `ORD-*` rows | **Done** (S0/S1 — `RUB` is the house currency across contracts, demo answers, and seeds) |
213213

214214
Vocabulary guardrails for all public docs: the company is an **own-brand /
215215
private-label importer** — always that framing; "store" (in `hub_store`) is

‎docs/dv2-multi-branch/RELEASE_STATUS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ backend-routed event scan, dedicated CI E2E lane), PII protection moves
1010
from the removed app-level string-parse gate to engine-enforced vault
1111
governance (ADR 0006 Phase 2 — fail-closed column grants,
1212
per-jurisdiction officer roles, row policies, `SQL SECURITY DEFINER`
13-
views; 32/32 live adversarial probes), plus the vendored NL→SQL
13+
views; every live adversarial probe green), plus the vendored NL→SQL
1414
generation engine routed through GraceKelly (ADR 0008), the DV2 raw
1515
vault PostgreSQL migration with `LISTEN`/`NOTIFY` freshness, the
1616
MinIO-backed PyIceberg catalog, ADR 0009, and the OpenSSF Scorecard

‎docs/dv2-multi-branch/demo_voiced.narration.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Импортёр мелкой кухонной техники под собственным брендом. Пять локаций — Москва, Питер, Екатеринбург, Дубай, Алматы. Три боли: кросс-канальный оверселл — один склад на все каналы, и партия дилеру должна попасть в остаток раньше, чем маркетплейсы допродадут те же единицы; контейнеры из Китая идут 40-60 дней, и застрявший на таможне груз — риск топ-3; операционка жонглирует пятью программами — 1С, Битрикс24, экран WMS, кабинеты маркетплейсов, Excel — ради ответа об одном заказе. Мы построили DV2.0 хранилище и операционный слой поверх: один ответ вместо пяти вкладок. Покажу.
22

3-
Кластер. Три ноды Kubernetes, лейблы branch равно msk, dxb, ala. По ним nodeSelector закрепляет Postgres и ClickHouse — data sovereignty на уровне планировщика.
3+
Кластер. Три ноды Kubernetes, все с лейблом branch равно msk — это HQ-демо. Postgres и ClickHouse закреплены через nodeSelector по лейблу workload; в проде тот же примитив закрепляет региональные edge-ноды branch равно dxb и ala — data sovereignty на уровне планировщика.
44

55
Модель. Семьдесят таблиц: восемь хабов, восемь линков, сорок восемь сателлитов, шесть BV вьюх поверх. Сателлиты разрезаны по record_source равно система плюс филиал. Один customer_hk из 1С и из Битрикса — конфликт решается приоритетом, аудит сохраняется.
66

‎docs/generator-spec.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ magnitude.
165165

166166
## 6. Suppliers and sourcing (reference generator)
167167

168-
The current reference is grocery (dairy/bakery supplier stems, food brands,
169-
gram weights, food ТН ВЭД headings) — it is replaced wholesale:
168+
The reference was originally grocery-shaped (dairy/bakery supplier stems,
169+
food brands, gram weights, food ТН ВЭД headings); it has since been replaced
170+
wholesale with the kitchen-appliance reference specified below (see CHANGELOG
171+
for the swap):
170172

171173
- **30 suppliers**: 22 CN contract factories (Guangdong/Zhejiang-style names,
172174
e.g. "Foshan …", "Ningbo …", "Cixi … Electric Appliance Co., Ltd." —
@@ -186,9 +188,9 @@ gram weights, food ТН ВЭД headings) — it is replaced wholesale:
186188
460–469 is *correct* for an own-brand importer — GTINs belong to the RU
187189
brand owner registered with GS1 RUS, regardless of where manufacturing
188190
happens. The module docstring already records this rationale.
189-
- **`tnved.py`**: grocery headings → the four appliance headings of §3
190-
(8516, 8509, 8423, 8422) with RU descriptions close to official wording,
191-
heading-granularity honesty note preserved.
191+
- **`tnved.py`**: the former grocery headings were replaced by the four
192+
appliance headings of §3 (8516, 8509, 8423, 8422) with RU descriptions
193+
close to official wording, heading-granularity honesty note preserved.
192194

193195
## 7. Customer populations
194196

‎monitoring/grafana/dashboards/merch-agent-journey.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
],
2323
"fieldConfig": {
2424
"defaults": {
25-
"unit": "currencyUSD"
25+
"unit": "currencyRUB"
2626
}
2727
}
2828
},
@@ -59,7 +59,7 @@
5959
],
6060
"fieldConfig": {
6161
"defaults": {
62-
"unit": "currencyUSD"
62+
"unit": "currencyRUB"
6363
}
6464
}
6565
},

0 commit comments

Comments
 (0)