You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(B-7,spec): record pending CredentialTier follow-up and update tech spec
Added a TRACKER.md note that a parallel Ouroboros effort is adding a
canonical CredentialTier (tracked as OQ-009 in docs/sirus-tech-spec.md)
and that this repo's local provisional
src/Infrastructure/DTOs/CredentialTier.php stub is intentionally left
untouched until the promoted version ships in a released Composer
version — it cannot be removed in this session.
Updated docs/sirus-tech-spec.md to reflect the spec-conformance audit
pass: corrected stale TrustLevelPrimitive documentation
(NORMAL/ELEVATED/CRITICAL -> NORMAL/STEP_UP_REQUIRED/LOCKED, matching
the real Ouroboros enum and the B-5 fix), documented the boot-time
schema/cron strategy (B-2), the legacy entry-point guard (B-3), the
credential-tier base-score table (B-4), the pulse TTL strategy (B-6),
the stub-drift CI check (D-4), corrected the Ouroboros dependency
version cited (^2.0 -> ^3.0, matching composer.json), and added a
changelog entry. TRACKER.md also records the B-3 table-name
reconciliation decision/reasoning and notes the pre-existing,
out-of-scope test failures observed while running the full suite.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XymX47EukYLRJmPQodqpg
| `SirusDatabase` schema boot | `src/core/SirusDatabase.php`, `src/SirusPlugin.php` | ✅ | **S-08** (fixed 2026-08-01) | **Platform-breaking bug fixed:** as a must-use plugin, Sirus never fires `register_activation_hook()`, so `ensure_schema()` was never called in a real deployment (only wired to `SirusPlugin::onActivation()`). Replaced with `SirusDatabase::maybe_upgrade_schema()` (public `SCHEMA_VERSION` int constant, one cheap `get_option()` read, `ensure_schema()` only on mismatch) called from `SirusPlugin::bootSchemaAndCron()` on an early `init` hook. Cron scheduling moved the same way, reusing the existing `wp_next_scheduled()`-guarded `schedule_cron()` pattern. `onActivation()`/`onDeactivation()` and the lifecycle hook registrations in `sparxstar-sirus-context.php` are removed. No table/column/index definitions changed — only *when* schema creation runs. Multisite: no explicit per-site loop needed (mirrors `SparxstarUECInstaller::activate_site()`'s "never loop over sites" rule) — each request already executes in its own site's `$wpdb`/option context. |
33
34
34
35
### Trust and Security
35
36
36
37
| Component | File | Status | Sprint | Notes |
37
38
|---|---|---|---|---|
38
39
|`TrustEngine`|`src/core/TrustEngine.php`| ✅ | S-01/S-02 | Frozen algorithm; 18 unit tests in `TrustEngineTest`|
39
-
|`TrustResolver`|`src/core/TrustResolver.php`| ✅ | S-01/S-02 | Credential-level base + drift/session deductions; 15 unit tests in `TrustResolverTest`|
and a new `ouroboros-stub-drift` CI job in `.github/workflows/test.yml` (runs after `php-tests`).
196
+
Reflects the real installed Ouroboros package and checks `TrustLevelPrimitive`, `ContextPulse`,
197
+
`Platform`, `ContextPulseSigningMaterial`, and `ContextBootException` against the shapes this
198
+
repo's code assumes — the automated version of the check that would have caught the historical
199
+
drift in `docs/DRAFT-OQ-016-trustlevelprimitive-drift.md` before it reached CI as 94 failures.
200
+
-**Pre-existing failures observed while running the full suite (not caused by this pass, not
201
+
fixed — out of scope):**`AuthorityResolverTest`/`CapabilityEngineTest` (6 + 8 tests) call a test
202
+
helper (`makeContext(string $credentialTier)`) that passes `TrustLevelPrimitive` string values
203
+
(`'NORMAL'`, `'STEP_UP_REQUIRED'`, `'LOCKED'`) into `CredentialTier::from()`, which throws
204
+
`ValueError` since those are not valid `CredentialTier` backing values — a test-authoring bug
205
+
confusing the two enums. `RestApiTest` (2 tests) calls `WP_REST_Request::set_body_params()`,
206
+
which the test bootstrap's `WP_REST_Request` stub does not implement. Both predate this branch.
207
+
155
208
## Current Review Notes — 2026-06-09
156
209
157
210
- Runtime/security review found `/context` accepted an optional `device_id` parameter but did not enforce it. The handler now rejects mismatches for both current-context and `ctx_token`-derived responses.
@@ -467,4 +520,4 @@ With the gate trustworthy, run the suite and flip 🟡 → ✅ in this tracker f
0 commit comments