Skip to content

Commit 2e6aaac

Browse files
author
DavidQ
committed
Enforce palette pass-through routing without mutation - PR 11.131
1 parent 5bc8174 commit 2e6aaac

5 files changed

Lines changed: 139 additions & 213 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
# CODEX COMMANDS
22

33
Model: GPT-5.3-codex
4-
Reasoning: medium
5-
6-
## PR
7-
BUILD_PR_LEVEL_11_130_TOOL_INPUT_CONTRACT_WITH_PALETTE_DEPENDENCY
4+
Reasoning: high
85

96
STRICT SCOPE MODE
107

118
ALLOWED FILES:
12-
- docs only
9+
- routing files only
1310

1411
TASK:
1512

16-
1. Document palette dependency rules
17-
2. Validate tools that require palette:
18-
- payload JSON direct
19-
- palette JSON direct
20-
3. Ensure:
21-
- no wrapper accepted
22-
- no parent JSON accepted
23-
- no fallback palette
24-
- no transform
13+
1. Find palette usage
14+
2. Remove:
15+
- palette injection
16+
- palette merging
17+
- defaults
18+
3. Ensure separate pass-through
19+
20+
VERIFY:
21+
payload unchanged
22+
palette unchanged
2523

2624
REPORT:
27-
docs/dev/reports/tool_palette_dependency_11_130.txt
25+
docs/dev/reports/palette_pass_through_11_131.txt
2826

29-
FAIL if any tool:
30-
- injects palette
31-
- transforms palette
27+
FAIL if mutation exists

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add palette dependency rules to tool input contract - PR 11.130
1+
Enforce palette pass-through routing without mutation - PR 11.131
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Palette Pass-Through Report: 11_131
2+
Date: 2026-04-30
3+
Repo: C:/Users/davidq/Documents/GitHub/HTML-JavaScript-Gaming
4+
Mode: STRICT SCOPE
5+
6+
Task
7+
1. Find palette usage.
8+
2. Remove palette injection, palette merging, defaults.
9+
3. Ensure separate pass-through.
10+
11+
Routing file changed
12+
- tools/shared/platformShell.js
13+
14+
Palette usage found
15+
- Workspace scoped preset routing for child tools and palette-browser.
16+
- Palette extraction for workspace/game manifests.
17+
- Shared palette hydration/injection path.
18+
19+
Changes applied
20+
1) Removed palette injection
21+
- Removed shared palette write/injection path from routing flow.
22+
- `writeSharedPaletteHandoff(...)` calls removed from platform shell routing.
23+
- Hydration variables in init routing are set to `false` (no palette injection side effects).
24+
25+
2) Removed palette merging and defaults
26+
- Removed palette normalization/merge builder function path.
27+
- Removed fallback palette id/display defaults.
28+
- Removed wrapped palette extraction (`tools["palette-browser"].payload`) from manifest palette read path.
29+
30+
3) Enforced pass-through only
31+
- `readPaletteFromManifestPayload(...)` now returns the direct `tools["palette-browser"]` object only when:
32+
- `schema === "html-js-gaming.palette"`
33+
- `swatches` is an array.
34+
- Otherwise returns `null`.
35+
- Workspace scoped resolver already returns direct object references for tool payload and palette payload.
36+
37+
Verification
38+
A) Payload unchanged
39+
- `selectWorkspaceScopedToolPreset(manifest, "vector-map-editor") === manifest.tools["vector-map-editor"]` -> true
40+
- JSON equality of payload -> true
41+
42+
B) Palette unchanged
43+
- `readPaletteFromManifestPayload(manifest) === manifest.tools["palette-browser"]` -> true
44+
- JSON equality of palette -> true
45+
- `selectWorkspaceScopedToolPreset(manifest, "palette-browser") === manifest.tools["palette-browser"]` -> true
46+
47+
C) Wrapper rejected
48+
- Wrapped palette input (`tools["palette-browser"].payload`) returns null for both read and select paths.
49+
50+
D) Mutation path audit
51+
- `writeSharedPaletteHandoff(` call exists: false
52+
- `buildPaletteHandoffShape` exists: false
53+
54+
Result
55+
- PASS
56+
- No palette injection.
57+
- No palette merging.
58+
- No palette defaults.
59+
- Separate pass-through preserved for payload and palette.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# BUILD_PR_LEVEL_11_131_ENFORCE_PALETTE_PASS_THROUGH_ROUTING
2+
3+
## Purpose
4+
Enforce that palette dependencies are passed through routing layers WITHOUT mutation and NEVER embedded or transformed.
5+
6+
## STRICT SCOPE
7+
8+
ALLOWED FILES:
9+
- workspace manager routing files
10+
- tool launch handlers
11+
12+
ALLOWED CHANGES:
13+
- remove palette injection
14+
- remove palette embedding
15+
- ensure palette passed as separate JSON reference
16+
17+
## RULE
18+
19+
payload JSON (tool) → unchanged
20+
palette JSON → unchanged
21+
22+
NO:
23+
- embedding palette into payload
24+
- merging palette into payload
25+
- transforming palette
26+
- default palette injection
27+
28+
## REQUIRED CHECKS
29+
30+
1. Locate palette usage in routing
31+
2. Ensure:
32+
- palette passed separately
33+
- payload untouched
34+
3. Remove:
35+
- inline palette building
36+
- palette defaults
37+
- palette merging
38+
39+
## VALIDATION
40+
41+
- payload before == payload after
42+
- palette before == palette after
43+
- missing palette → error (not fallback)
44+
45+
## REPORT
46+
47+
docs/dev/reports/palette_pass_through_11_131.txt:
48+
- files checked
49+
- violations
50+
- fixes applied
51+
52+
## FAILURE
53+
54+
FAIL if:
55+
- palette is embedded
56+
- palette is mutated

0 commit comments

Comments
 (0)