Skip to content

feat(governance): per-tenant governance packages — GT-532 - #115

Merged
beyondnetPeru merged 1 commit into
developfrom
feat/gt-532-governance-packages
Aug 2, 2026
Merged

feat(governance): per-tenant governance packages — GT-532#115
beyondnetPeru merged 1 commit into
developfrom
feat/gt-532-governance-packages

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

The row says "governance cannot be packaged per customer". A tenant configured it piece by piece — one GatePolicy per phase, one ArtifactFieldSchema per artifact type — with no way to take that configuration whole: version it, review it as a unit, or move it to another tenant.

GET /governance-packages/export now produces a named, versioned, portable document. POST /governance-packages/apply installs one.

Four decisions worth arguing with

  1. A package is a DOCUMENT, not a persisted aggregate. Storing it would add a third copy of data that already lives in two places — precisely the failure this repository has spent the week repairing. No table also means no migration and no drift.
  2. It carries no tenant id anywhere, at any nesting level, and the destination is always the session tenant. A package that dragged its source tenant into a target is exactly the isolation leak the product forbids. Enforced by reflection over the types, not over a call, so adding the field breaks the test even if nobody writes a request that uses it — verified by adding it and watching it go red.
  3. Export is deterministically ordered. Two exports of the same state must produce the same document, or nobody can diff two packages or review a governance change in a pull request.
  4. Apply refuses an invalid package entirely before touching anything — but once it starts, it does not stop at the first failure. A partially applied package is a fact worth seeing whole; stopping early leaves a state the report does not describe.

The mechanism, never the content

Per T-056, a canned "ISO 27001 package" would be engine code holding an opinion that belongs to the tenant. A test asserts the repository contains no applicable package.

The other half of the criterion was already met

TowerMd3 is the executive portfolio view — "Control Tower", subtitled live SDLC governance across the portfolio, with a Portfolio flow section and counters over the session tenant's initiatives and executions.

Credited rather than rebuilt. Reimplementing it would have been the eighth instance this week of building something that already existed.

Scope

The row's title also mentions marketplace adapters. The acceptance criteria never asked for them, and the row's own risk note warns about effort dispersion — so what landed is the packaging mechanism, and the row says so.

13 tests. The 10 failures in the local suite are the pre-existing DB-gated integration tests that fail by design without PostgreSQL; none is in this change.

🤖 Generated with Claude Code

The row's problem statement is that governance cannot be packaged per customer.
A tenant configured it piece by piece - one GatePolicy per phase, one
ArtifactFieldSchema per artifact type - with no way to take that configuration
whole, version it, review it as a unit, or move it to another tenant.

GET /governance-packages/export produces a named, versioned, portable document.
POST /governance-packages/apply installs one.

Four decisions worth arguing with:

  A package is a DOCUMENT, not a persisted aggregate. Storing it would add a
  third copy of data that already lives in two places, which is exactly the
  failure this repository has spent the week repairing. No table also means no
  migration and no drift.

  It carries NO tenant id anywhere, at any nesting level, and the destination is
  always the SESSION tenant. A package that dragged its source tenant into a
  target is precisely the isolation leak the product forbids. Enforced by
  reflection over the types rather than over a call, so adding the field breaks
  the test even if nobody writes a request that uses it - verified by adding it
  and watching it go red.

  Export is deterministically ordered, because two exports of the same state
  must produce the same document or nobody can diff two packages or review a
  governance change in a pull request.

  Apply refuses an invalid package ENTIRELY before touching anything, but once
  it starts it does not stop at the first failure: a partially applied package
  is a fact worth seeing whole, and stopping early leaves a state the report
  does not describe.

The product ships the MECHANISM and no content. Per T-056 a canned "ISO 27001
package" would be engine code holding an opinion that belongs to the tenant, and
a test asserts the repository contains no applicable package.

The other half of criterion 1 was already met: TowerMd3 is the executive
portfolio view. Credited rather than rebuilt - reimplementing it would have been
the eighth instance this week of building something that already existed.

13 tests. The 10 failures in the local suite are the pre-existing DB-gated
integration tests that fail by design without PostgreSQL.
@beyondnetPeru
beyondnetPeru merged commit 737e469 into develop Aug 2, 2026
6 checks passed
@beyondnetPeru
beyondnetPeru deleted the feat/gt-532-governance-packages branch August 2, 2026 23:13
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.

1 participant