Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ Current OWNER clarification:

- [x] Delta - Shared JS consolidation
- Completion reference: PR_26175_DELTA_002_Shared_Runtime_Consolidation.
- [ ] Delta - API client consolidation
- [x] Delta - API client consolidation
- Completed by PR_26175_DELTA_003_API_Client_Standardization.
- [x] Delta - Runtime performance audit
- Completion reference: PR_26175_DELTA_001_Runtime_Performance_Optimization.
- [ ] Delta - Engine test coverage improvements
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PR_26175_DELTA_003 Branch Validation

| Gate | Status | Evidence |
| --- | --- | --- |
| Current branch before work | PASS | `main` after PR_002 merge |
| Worktree before work | PASS | Clean |
| Local/origin sync before work | PASS | `0 0` |
| Team ownership | PASS | Team Delta owns Shared JS, API clients, Runtime, Performance, and technical debt remediation. |
| Work branch | PASS | `PR_26175_DELTA_003_API_Client_Standardization` |
| Previous Delta PR closed | PASS | PR_002 was merged and `main` was verified before PR_003 started. |
| Scope boundary | PASS | Shared server API data helper plus session/setup/DB Viewer adopters and focused test only. |

## Instruction Reads

PASS - All files under `docs_build/dev/ProjectInstructions/` were read before the Delta sequence, and updated instructions were reread after pulling latest `main`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PR_26175_DELTA_003 Manual Validation Notes

## Manual Review

- Confirmed the shared API helper remains backward compatible for existing callers.
- Confirmed Session, Admin Setup, and DB Viewer clients retain their previous restore guidance text.
- Confirmed no runtime UI, Theme V2, browser-owned data, or status bar files changed.

## Manual Validation

PASS - Code review found no unrelated runtime behavior change.

## Follow-Up

- Remaining Delta runtime work continues in the next sequential PRs for runtime test expansion and technical debt cleanup.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# PR_26175_DELTA_003 Requirement Checklist

| Requirement | Status | Notes |
| --- | --- | --- |
| Team Delta ownership only | PASS | API client standardization is Delta-owned. |
| One PR purpose | PASS | Shared server API data handling consolidation only. |
| Preserve backward compatibility | PASS | Existing default and domain-specific restore messages are preserved. |
| Update backlog | PASS | `Delta - API client consolidation` marked complete. |
| Update tool state if applicable | PASS | Not applicable; no tool tile/status changed. |
| Produce governance reports | PASS | Summary, branch validation, checklist, validation lane, manual notes, Codex diff, changed-file list, and ZIP. |
| Runtime validation | PASS | Focused node checks and API/dev-runtime tests passed. |
| No unrelated files | PASS | Changes are limited to API clients, focused test, backlog, and reports. |
| No branch deletion | PASS | Source branch retained. |

## Compatibility Notes

- `requireServerApiData(...)` remains source compatible for existing two-argument callers.
- New optional restore guidance avoids local unwrap duplication without weakening domain-specific diagnostics.
- Browser API route resolution behavior is unchanged.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# PR_26175_DELTA_003 Validation Lane

## Commands

```powershell
node --check src/api/server-api-client.js
node --check src/api/session-api-client.js
node --check src/api/admin-setup-api-client.js
node --check src/api/db-viewer-api-client.js
node --check tests/dev-runtime/ServerApiClientStandardization.test.mjs
node tests/dev-runtime/ServerApiClientStandardization.test.mjs
node tests/dev-runtime/PublicApiUrlClient.test.mjs
node tests/dev-runtime/DbViewerConfiguredSnapshot.test.mjs
node tests/dev-runtime/AdminHealthOperations.test.mjs
git diff --check
```

## Results

| Command | Status |
| --- | --- |
| `node --check src/api/server-api-client.js` | PASS |
| `node --check src/api/session-api-client.js` | PASS |
| `node --check src/api/admin-setup-api-client.js` | PASS |
| `node --check src/api/db-viewer-api-client.js` | PASS |
| `node --check tests/dev-runtime/ServerApiClientStandardization.test.mjs` | PASS |
| `node tests/dev-runtime/ServerApiClientStandardization.test.mjs` | PASS |
| `node tests/dev-runtime/PublicApiUrlClient.test.mjs` | PASS |
| `node tests/dev-runtime/DbViewerConfiguredSnapshot.test.mjs` | PASS |
| `node tests/dev-runtime/AdminHealthOperations.test.mjs` | PASS |
| `git diff --check` | PASS |

## Browser Validation

SKIP - No browser UI files changed.

## Playwright Validation

SKIP - API client standardization is covered by focused Node tests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# PR_26175_DELTA_003_API_Client_Standardization

## Summary

Team Delta standardized remaining local API data unwrap helpers onto the shared `requireServerApiData(...)` client boundary.

`requireServerApiData(...)` now accepts optional client-specific restore guidance while preserving the existing default Browser -> Server API -> Data Source contract message. Session, Admin Setup, and DB Viewer API clients now delegate to the shared helper and keep their previous domain-specific guidance.

## Scope

- Team: Delta
- Backlog item: `Delta - API client consolidation`
- Shared API client changed: `src/api/server-api-client.js`
- API clients consolidated:
- `src/api/session-api-client.js`
- `src/api/admin-setup-api-client.js`
- `src/api/db-viewer-api-client.js`
- Tests added: `tests/dev-runtime/ServerApiClientStandardization.test.mjs`
- Backlog updated: `docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md`

## Runtime Impact

PASS - API client behavior remains backward compatible.

- Successful server API responses still return `payload.data`.
- Failed server API responses still throw the server error text.
- Missing `data` payloads still emit actionable restore guidance.
- Existing session, setup, and DB Viewer restore messages are preserved through the shared helper.

## Backlog Update

PASS - `Delta - API client consolidation` is marked complete with this PR as the completion reference.

## Tool State Update

SKIP - No Build Path tool status or tool tile state changed.

## Validation Summary

PASS - Focused API client and adjacent dev-runtime validation completed.

See `PR_26175_DELTA_003_API_Client_Standardization-validation.md` for command details.

## Branch Disposition

Source branch should be retained after merge unless OWNER later approves branch deletion.
25 changes: 13 additions & 12 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md / updated
src/shared/runtime/snapshotClone.js / updated
src/engine/replay/ReplayModel.js / updated
src/engine/replay/ReplaySystem.js / updated
tests/replay/ReplaySystem.test.mjs / updated
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation.md / added
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-branch-validation.md / added
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-requirement-checklist.md / added
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-validation.md / added
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-manual-validation-notes.md / added
docs_build/dev/reports/codex_changed_files.txt / updated
docs_build/dev/reports/codex_review.diff / updated
docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md
docs_build/dev/reports/PR_26175_DELTA_003_API_Client_Standardization-branch-validation.md
docs_build/dev/reports/PR_26175_DELTA_003_API_Client_Standardization-manual-validation-notes.md
docs_build/dev/reports/PR_26175_DELTA_003_API_Client_Standardization-requirement-checklist.md
docs_build/dev/reports/PR_26175_DELTA_003_API_Client_Standardization-validation.md
docs_build/dev/reports/PR_26175_DELTA_003_API_Client_Standardization.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
src/api/admin-setup-api-client.js
src/api/db-viewer-api-client.js
src/api/server-api-client.js
src/api/session-api-client.js
tests/dev-runtime/ServerApiClientStandardization.test.mjs
Loading
Loading