docs(P01): complete Orgs+Window foundation phase
---ci--- project: oy phase: 1 milestone: v0.2 status: complete phase_role: execution requirements: covered: [REQ-015, REQ-016, REQ-017, REQ-012] partial: [] ---/ci--- Phase 1 (Orgs+Window foundation) complete. 3 new modules (x/window, x/stand, x/guild) + lexicon meta-test scaffolding (G-004). 143 tests total (53 v0.1 baseline + 90 new), 100% coverage on new packages. Window = fullest primitive (lifecycle Open->Active->Revoked-> Expired, rate-limit, append-only audit log). 9-type Stand enum. Guild Hand-Pass @ 0% fee. G-003 by-ID-string import invariant test green. G-004/G-009 lexicon meta-test + self-test table green. Tagged v0.1.1.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"phase": 0,
|
||||
"stage": "plan",
|
||||
"phase": 1,
|
||||
"stage": "execute",
|
||||
"milestone": "v0.2",
|
||||
"milestone_type": "feature",
|
||||
"tag_base": "v0.1.x",
|
||||
"phase_role": "pre_execution",
|
||||
"phase_role": "execution",
|
||||
"project": "oy",
|
||||
"attempts": 0,
|
||||
"updated_at": "2026-08-17T21:00:00Z"
|
||||
"updated_at": "2026-08-17T21:15:00Z"
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
# P1 — Orgs + Window Foundation — Ship Verification
|
||||
|
||||
Phase 1 of v0.2 (The Mesh). Branch: `oy/phase/01-orgs-window-foundation`.
|
||||
|
||||
This file is the lead-developer's P1-04-01 ship-verification report. The
|
||||
executor agent runs the build/test/cover checks and reports results; the
|
||||
orchestrator handles the merge/tag/push (`v0.1.1`).
|
||||
|
||||
## Tasks shipped (8)
|
||||
|
||||
| Task ID | Commit | Deliverable |
|
||||
|---|---|---|
|
||||
| P1-01-01 | `81db3e6` | Window types — Window/Scope/RateLimit/AuditEntry + lifecycle (REQ-015) |
|
||||
| P1-02-01 | `0be6331` | Stand types — 9-type enum + Stand/Membership/StandPolicy (REQ-016) |
|
||||
| P1-03-01 | `dbdc17e` | Guild types — Guild + HandPass @ 0% (REQ-017) |
|
||||
| P1-01-02 | `0e72c64` | Window tests — lifecycle/idempotency/lexicon/G-003 (REQ-015) |
|
||||
| P1-01-03 | `2e0ffec` | Window genesis audit-log schema tests (REQ-015) |
|
||||
| P1-02-02 | `82d5bca` | Stand tests — 9-type locked-const + enum/lexicon (REQ-016) |
|
||||
| P1-02-03 | `e24d7bc` | Stand genesis schema — membership-set invariants (REQ-016) |
|
||||
| P1-03-02 | `e0832bd` | Guild tests — HandPassFeeBps=0 invariant + lexicon (REQ-017) |
|
||||
| P1-04-02 | `e36b26d` | lexicon meta-test scaffolding — project-wide firewall (REQ-012, G-004/G-009) |
|
||||
|
||||
## Verification results
|
||||
|
||||
### `go build ./...`
|
||||
GREEN. All 19 packages (15 v0.1 baseline + 3 new P1 + lexicon) compile with
|
||||
zero external deps (only stdlib `encoding/json`, `fmt`, `regexp`, `strings`,
|
||||
`go/parser`, `go/token`, `os`, `path/filepath`, `runtime`).
|
||||
|
||||
### `go test ./...`
|
||||
GREEN. 143 tests across the repo; v0.1 baseline (53 tests) unchanged — no
|
||||
regression. New: window (41 tests), stand (28), guild (17), lexicon meta (4).
|
||||
|
||||
### Coverage (`go test -cover`)
|
||||
| Package | Coverage | Target |
|
||||
|---|---|---|
|
||||
| `x/window/types` | 100.0% | ≥80% |
|
||||
| `x/stand/types` | 100.0% | ≥80% |
|
||||
| `x/guild/types` | 100.0% | ≥80% |
|
||||
|
||||
### P1 Must-Haves checklist
|
||||
- [x] `x/window`, `x/stand`, `x/guild` each have `types/types.go` + `types_test.go` (v0.1 pattern, package `types`, zero external deps).
|
||||
- [x] `go build ./...` and `go test ./...` green across the whole repo.
|
||||
- [x] ≥80% coverage on `x/window/types`, `x/stand/types`, `x/guild/types` (all 100%).
|
||||
- [x] Window lifecycle tests: Open→Active→Revoked→Expired; revoke-after-expire no-op; double-revoke idempotent.
|
||||
- [x] Stand locked-const: exactly 9 types with vision §11 names.
|
||||
- [x] Guild `HandPassFeeBps == 0` invariant test.
|
||||
- [x] Lexicon assertion in all 3 new test files.
|
||||
- [x] `ValidateGenesis` performs ID-uniqueness checks (A-212 upgrade from v0.1 no-op).
|
||||
- [x] Project-wide lexicon meta-test (G-004) scans all `x/**/*.go`; self-test table (G-009) detects all 10 banned terms.
|
||||
- [x] G-003 by-ID-string import invariant test passes (zero cross-module struct imports in production code under x/).
|
||||
- [ ] Git tag `v0.1.1` — NOT created by executor; orchestrator ships the phase.
|
||||
|
||||
## Deviations
|
||||
- **Banned-terms count**: spec says "9 banned terms" but enumerates 10
|
||||
(dollar AND euro are distinct terms, not a single pair). Implemented 10 to
|
||||
match the enumerated list; documented in `lexicon/lexicon.go` and the
|
||||
meta-test. The firewall scope is the enumerated list, not the count label.
|
||||
- **genesis.go placement**: P1-01-03's `genesis.go` (ValidateAuditLogs) was
|
||||
authored in P1-01-01 so `types.go` compiles (types.go references
|
||||
ValidateAuditLogs). P1-01-03 adds `genesis_test.go` (the security-engineer's
|
||||
assertions, G-008 split). Same content, just split across the two commits
|
||||
for the persona boundary.
|
||||
- **Word-boundary lexicon matching**: substring matching would false-positive
|
||||
on "openyield" (matches "yield"). Implemented word-boundary regex matching
|
||||
in `lexicon.FindBannedTerm`; documented and tested with a
|
||||
no-false-positive test.
|
||||
|
||||
## Hand-off
|
||||
Orchestrator: merge `oy/phase/01-orgs-window-foundation` and tag `v0.1.1`.
|
||||
Executor did not merge/tag/push per instructions.
|
||||
Reference in New Issue
Block a user