merge: unify GitHub main into Gitea main (0pt)
CI (SIAX Cloud) / quality (push) Successful in 38s
CI (SIAX Cloud) / security (push) Successful in 17s

Merges github/main (6 commits: 17-bug audit fix, CI quality gate,
.env.example + .gitignore fix, missing platform clients + registry
services, docs accuracy overhaul) into gitea/main (8 commits: Iceberg
write boundary + live ST0RE verification, lakehouse mapping routes,
Waves 1-4 foundational hardening).

16 conflicts. Both sides had independently written the four
src/clients/*.ts and the two registry services, so those are combined
rather than picked:

- st0re-client.ts: GitHub's endpoint wins on evidence. POST goes to
  /v1/st0re/artifacts/register, not /v1/st0re/artifacts -- verified in
  sax3l/st0re src/api/routes/artifacts.ts, where the bare path is a
  GET-only list route. Gitea's URL normalisation, error-body text and
  mock kept.
- n0d-client.ts: field is `status`, not `state`, with N0D's real 13-state
  union -- verified in sax3l/n0d packages/schemas/n0d.job.schema.json,
  which says explicitly not to add "succeeded". Gitea's mock echo,
  URL normalisation and error-body text kept.
- cl0ud-client.ts: Gitea's fail-closed HTTP normalisation kept (a 200
  with no `decision` reads as "deny", not as a silent allow). GitHub's
  PolicyDecision/PolicyDecisionValue naming kept; PolicyResult retained
  as an alias.
- aud0-client.ts: permissive union of both input types (optional
  payload/metadata/correlation_id), GitHub's echo return, Gitea's URL
  normalisation and error-body text, plus a JSON-parse fallback so a
  successful POST with an empty body does not throw.
- dataset-service.ts / source-service.ts: GitHub's record/DTO split and
  event naming (0pt.source_created / 0pt.create_source, which the merged
  docs already reference) plus Gitea's name validation, description /
  created_by fields and actor_id derivation. List filters are the union.
- lakehouse mapping routes: GitHub's shared lakehouse-mapping-registry
  singletons (without which every write 400'd "mapping not found") AND
  Gitea's Zod parseBody validation. Both, not either.
- src/types/source.ts, src/types/dataset.ts: unions of both vocabularies;
  GitHub's `access` legal-sourcing field kept.
- .env.example: GitHub's audited inventory plus Gitea's Zitadel /
  AUTH_ENFORCE block.
- CLAUDE.md, docs/ICEBERG_WRITE_BOUNDARY.md: GitHub's corrections kept,
  Gitea's live-verification kept and marked as superseding the
  "would 400 outright" finding (Gitea had already added the required
  X-Tenant-Id/X-Actor-Id headers).
- pnpm-lock.yaml: regenerated with pnpm 9.15.9, not merged.

Also corrects CLAUDE.md's claim that the banned services/scrapers stack
was "since removed" -- the removal PR is open, not merged, and this
branch inherits that code from Gitea main. Nothing here resurrects,
extends or re-wires any of it; services/scrapers/ is byte-identical to
Gitea main.

Verified on the merged tree: typecheck (src/ + tests/) clean;
17 test files, 121 passed, 1 skipped (the realinfra test skipping
honestly on ST0RE HTTP 401), 0 failures. Gitea main baseline was the
same 121/1; GitHub main baseline could not even `pnpm install`
("packages field missing or empty") -- Gitea's pnpm-workspace.yaml fix
resolves that. Whole-repo `typecheck:app` reports 9 errors, an identical
set to Gitea main's baseline, so it is advisory in both CI workflows
rather than deleted. Lint: 16 problems, identical to Gitea baseline.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Claude (SIAX platform session)
2026-07-28 12:38:01 +02:00
co-authored by Claude Opus 5
58 changed files with 2785 additions and 610 deletions
+44
View File
@@ -0,0 +1,44 @@
// 0pt.dataset.schema.v1
//
// A dataset 0pt produces or manages -- the thing `dataset_iceberg_mapping`
// (src/types/dataset-iceberg-mapping.ts) points at, and the thing
// IcebergWriteService (src/services/iceberg-write-service.ts) writes through
// ST0RE's table registry on behalf of. This type intentionally stays small:
// it is a reference/registry entry, not a copy of dataset content, schema,
// or quality state (that boundary is documented in
// docs/ICEBERG_WRITE_BOUNDARY.md -- 0pt owns dataset production, but this
// specific type is only what DatasetIcebergMappingService/IcebergWriteService
// need to confirm a dataset_id is real before pointing a table at it).
// Union of both dataset-type vocabularies that existed in this repo's two
// remotes ("structured" from one, "feature"/"derived" from the other);
// nothing is dropped by the GitHub<->Gitea unification merge.
export type DatasetType = "raw" | "structured" | "enriched" | "curated" | "feature" | "derived";
export type DatasetStatus = "active" | "archived" | "deprecated";
export interface Dataset {
dataset_id: string;
tenant_id: string;
project_id: string;
name: string;
dataset_type: DatasetType;
status: DatasetStatus;
description?: string;
correlation_id?: string;
created_at: string;
updated_at?: string;
created_by?: string;
}
export interface CreateDatasetInput {
dataset_id: string;
tenant_id: string;
project_id: string;
name: string;
dataset_type: DatasetType;
description?: string;
status?: DatasetStatus;
correlation_id?: string;
created_by?: string;
}
+35 -2
View File
@@ -8,12 +8,37 @@
* (src/services/source-query-service.ts), which reads `source_type` +
* `adapter_id` to decide whether a Source is queryable.
*
* This is a DIFFERENT, newer entity than the static provenance catalog in
* docs/03-data-model.md's `dim_source` table (the ~9-row list of national
* registries served today by GET /api/sources) -- this Source is a per-tenant
* registration of something 0pt can actually connect to. See
* docs/P0_QUERY_SOURCE_FLOW.md and src/services/source-query-service.ts, the
* first real consumer.
*
* `adapter_id` is the seam that lets a "database" source name the concrete
* driver 0pt should use for it (today only "fabric_onelake_sql" is wired on
* the synchronous path — see source-query-service.ts).
*
* `access` mirrors dim_source.access (docs/03-data-model.md) so a Source
* registered here can still be reported against the same legal-sourcing
* vocabulary CLAUDE.md §1 requires everywhere in this repo.
*/
/**
* Union of both source-type vocabularies that existed in this repo's two
* remotes; nothing is dropped by the unification merge.
*/
export type SourceType = "database" | "file" | "web" | "api" | "stream" | "manual";
export type SourceStatus = "active" | "paused" | "archived";
/**
* Union of both status vocabularies. "archived" and "deprecated" both survive
* the unification merge -- they were introduced independently and no code
* treats either as canonical.
*/
export type SourceStatus = "active" | "paused" | "archived" | "deprecated";
/** Legal-sourcing vocabulary, mirroring dim_source.access. */
export type SourceAccess = "api" | "bulk" | "authorized_web" | "licensed";
export interface Source {
source_id: string;
@@ -21,8 +46,15 @@ export interface Source {
project_id: string;
source_type: SourceType;
name: string;
/** Concrete driver id for this source, e.g. "fabric_onelake_sql". Optional: not every source is directly queryable. */
/**
* Identifies which concrete adapter implementation this source is queried
* through (e.g. "fabric_onelake_sql" -- src/adapters/fabric-onelake-adapter.ts).
* Required in practice for source_type "database"; optional/unused for other
* types until they grow a synchronous query path of their own.
*/
adapter_id?: string;
/** Mirrors dim_source.access (docs/03-data-model.md). */
access?: SourceAccess;
description?: string;
status: SourceStatus;
correlation_id?: string;
@@ -38,6 +70,7 @@ export interface CreateSourceInput {
source_type: SourceType;
name: string;
adapter_id?: string;
access?: SourceAccess;
description?: string;
status?: SourceStatus;
correlation_id?: string;