Record the completed Gate 7 tenant boundary

12939583ca39 · Christopher David · · parent 8db39fe3fe3c

Record the completed Gate 7 tenant boundary

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified docs/2026-08-20-integration-hardening-and-staging-readiness-recommendations.md
  • added docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/README.md
  • added docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/baseline-receipt.json
  • added docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/migration-rehearsal.json

Diff

4 files changed, +107 -1

docs/2026-08-20-integration-hardening-and-staging-readiness-recommendations.md modified +38 -1

@@ -2,7 +2,7 @@

2 2
3 3
Date: 2026-08-20
4 4
5
Status: In progress; Gates 0–5 complete, Gate 6 application controls locally verified
5
Status: In progress; Gates 0–5 and 7 complete, Gate 6 application controls locally verified
6 6
7 7
## Outcome
8 8

@@ -681,6 +681,43 @@ then update the tests that currently pin them as existing behavior.

681 681
**Exit criteria:** An owner or repository path can never read or mutate a row
682 682
owned by another repository, and PostgreSQL enforces the boundary.
683 683
684
### Gate 7 implementation status
685
686
Completed on 2026-08-20:
687
688
- Added a canonical repository entity with stable UUID, normalized owner/name,
689
  visibility, default branch, and active role-bearing memberships. Public
690
  lookup now excludes private repositories, and writes require owner,
691
  maintainer, or contributor membership.
692
- Added repository foreign keys throughout issues, labels, milestones,
693
  comments, projects, project items, issue-label relationships, and
694
  issue-assignee relationships. Issue and milestone numbers are unique within
695
  a repository rather than across the application.
696
- Scoped route-facing controller and LiveView queries by repository in the same
697
  database lookup. Cross-repository identifiers now fail closed, and composite
698
  database constraints enforce the same issue-label, issue-assignee,
699
  issue-comment, issue-milestone, project-owner, and project-item boundaries.
700
- Replaced the empty assignee endpoint and arbitrary-login mutation with the
701
  active repository membership set. Fixed every project action that previously
702
  ignored the username segment, including create ownership.
703
- Added a reversible migration that backfills the existing rows into the
704
  explicit `OpenAgentsInc/openagents.com` repository and preserves legacy
705
  label, assignee, milestone, comment-author, project-owner, and project-item
706
  relationships. Rehearsed the migration down/up against a populated
707
  disposable test database, validated each relationship, then repeated the
708
  down/up cycle and reset the test database.
709
- Added multi-repository isolation, private-read, membership, controller,
710
  project-path, and composite-constraint tests while retaining the established
711
  Issues and Projects behavior coverage.
712
- Exact implementation commit
713
  `8db39fe3fe3ce9a338117c0e96521a00c09b146a` passed the owned baseline without
714
  retries in 81 seconds: 1,283 default Elixir tests, all 9 distributed tests,
715
  17 browser tests, 83.44% merged coverage, and the packaged production release
716
  startup against a disposable PostgreSQL database. See the
717
  [Gate 7 evidence](evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/README.md).
718
719
Gate 7 is complete. No staging or production environment was changed.
720
684 721
## Gate 8: Harden chat, memory, work, machines, and voice
685 722
686 723
### Chat and provider lifecycle
docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/README.md added +22

@@ -0,0 +1,22 @@

1
# Gate 7 repository-boundary evidence
2
3
Date: 2026-08-20
4
5
Implementation SHA: `8db39fe3fe3ce9a338117c0e96521a00c09b146a`
6
7
Gate 7 passed locally on the exact implementation commit. The evidence set is
8
content-free and contains no credentials, hostnames, database URLs, private
9
repository content, or staging data.
10
11
## Evidence
12
13
- `baseline-receipt.json` is the immutable result copied from the owned
14
  exact-SHA gate receipt. Precommit, merged coverage, all nine distributed
15
  tests, browser tests, and the packaged production release startup passed
16
  without retries.
17
- `migration-rehearsal.json` records the populated down/up rehearsal and the
18
  preserved repository relationships. The rehearsal was repeated before the
19
  disposable test database was reset.
20
21
The release startup used an explicitly acknowledged disposable PostgreSQL
22
database. No staging or production deployment occurred.
docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/baseline-receipt.json added +21

@@ -0,0 +1,21 @@

1
{
2
  "schema": "openagents.baseline-gate.v1",
3
  "git_sha": "8db39fe3fe3ce9a338117c0e96521a00c09b146a",
4
  "status": "passed",
5
  "started_at": "2026-08-20T08:45:01Z",
6
  "completed_at": "2026-08-20T08:46:22Z",
7
  "total_duration_seconds": 81,
8
  "automatic_retries": 0,
9
  "stages": {
10
    "precommit": {"status": "passed", "duration_seconds": 23},
11
    "coverage": {"status": "passed", "duration_seconds": 51},
12
    "release_smoke": {"status": "passed", "duration_seconds": 7}
13
  },
14
  "tests": {
15
    "javascript": 17,
16
    "default": 1283,
17
    "cluster": 9,
18
    "excluded_from_default": 9
19
  },
20
  "coverage_percent": 83.44
21
}
docs/evidence/gate-7/8db39fe3fe3ce9a338117c0e96521a00c09b146a/migration-rehearsal.json added +26

@@ -0,0 +1,26 @@

1
{
2
  "schema": "openagents.migration-rehearsal.v1",
3
  "git_sha": "8db39fe3fe3ce9a338117c0e96521a00c09b146a",
4
  "migration": "20260820082100_add_repository_tenant_scoping",
5
  "environment": "disposable_test_database",
6
  "status": "passed",
7
  "steps": [
8
    "rolled the migration down",
9
    "inserted representative pre-scope user, label, milestone, issue, comment, project, and project-item rows",
10
    "migrated up",
11
    "validated the backfilled repository and relationships",
12
    "rolled down and migrated up a second time",
13
    "reset the disposable test database"
14
  ],
15
  "validation": {
16
    "repository_id": "00000000-0000-4000-8000-000000000001",
17
    "issue_label_relationships": 1,
18
    "issue_assignee_relationships": 1,
19
    "milestone_link_preserved": true,
20
    "comment_author_preserved": true,
21
    "project_owner_preserved": true,
22
    "project_item_repository_preserved": true
23
  },
24
  "staging_changed": false,
25
  "production_changed": false
26
}

This page updates live while a promote is in flight · changelog