Skip to content

Commit 1ab72cd

Browse files
author
DavidQ
committed
Lock schemas as single source of truth with strict validation - PR 11.143
1 parent c1b5b63 commit 1ab72cd

4 files changed

Lines changed: 118 additions & 7 deletions

File tree

docs/dev/codex_commands.md

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

33
Model: GPT-5.3-codex
4-
Reasoning: low
4+
Reasoning: high
55

66
STRICT SCOPE MODE
77

88
ALLOWED FILES:
9-
- docs/dev/reports/schema_lock_readiness_11_142.txt
9+
- tools/schemas/**/*.json
1010

1111
TASK:
1212

13-
1. Verify runtime + routing from previous PR
14-
2. Do NOT change code
15-
3. Document readiness
13+
1. For each schema:
14+
- ensure additionalProperties: false
15+
- remove any wrapper acceptance
16+
- ensure strict payload validation
17+
18+
2. Validate:
19+
- valid JSON passes
20+
- wrapper fails
21+
- parent fails
22+
23+
3. DO NOT:
24+
- modify runtime
25+
- modify routing
26+
- modify samples
1627

1728
REPORT:
18-
docs/dev/reports/schema_lock_readiness_11_142.txt
29+
docs/dev/reports/schema_lock_enforcement_11_143.txt
30+
31+
FAIL if any schema remains loose

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Prepare for schema lock phase - PR 11.142
1+
Lock schemas as single source of truth with strict validation - PR 11.143
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Schema Lock Enforcement Report: 11_143
2+
Date: 2026-04-30
3+
Repo: C:/Users/davidq/Documents/GitHub/HTML-JavaScript-Gaming
4+
Mode: STRICT SCOPE
5+
6+
Scope
7+
- Allowed schema files: tools/schemas/**/*.json
8+
- No runtime/routing/sample code changes performed
9+
10+
Execution Summary
11+
1) additionalProperties strictness
12+
- Audited every schema under tools/schemas/**/*.json.
13+
- Result: all root schemas and all nested `type: object` schema nodes already define `additionalProperties: false`.
14+
- Check result: TOTAL_OBJECT_SCHEMA_MISSES=0
15+
16+
2) Wrapper and parent rejection + valid payload acceptance
17+
- Ran per-schema contract validation over all schema JSON files using repo-local schema resolver + validator logic.
18+
- For each schema, tested:
19+
- A valid synthesized payload -> must pass
20+
- A wrapper-shaped JSON -> must fail
21+
- A parent/workspace-shaped JSON -> must fail
22+
- Results:
23+
- valid: PASS for all schemas
24+
- wrapper: FAIL (expected) for all schemas
25+
- parent: FAIL (expected) for all schemas
26+
- Summary result: SUMMARY_FAILURES=0
27+
28+
Validation Outcome
29+
- PASS
30+
- No schema remains loose under the required checks.
31+
32+
Files Changed
33+
- docs/dev/reports/schema_lock_enforcement_11_143.txt
34+
35+
Strict Scope Notes
36+
- Runtime files: not modified
37+
- Routing files: not modified
38+
- Sample files: not modified
39+
- Schema JSON files: no edits were required because all checks already passed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# BUILD_PR_LEVEL_11_143_SCHEMA_LOCK_ENFORCEMENT
2+
3+
## Purpose
4+
Lock schemas as the single source of truth now that runtime and routing are clean.
5+
6+
## Scope
7+
- testable PR
8+
- STRICT SCOPE
9+
- schema-only changes
10+
- no runtime changes
11+
- no routing changes
12+
13+
## ALLOWED FILES
14+
15+
- tools/schemas/**/*.json
16+
17+
## ALLOWED CHANGES
18+
19+
- enforce strict schema contracts
20+
- ensure all schemas:
21+
- use additionalProperties: false
22+
- reject wrapper JSON
23+
- reject parent JSON
24+
- validate only correct payload shape
25+
26+
## REQUIRED CHANGES
27+
28+
For EACH tool schema:
29+
30+
1. MUST:
31+
- validate ONLY tool payload
32+
- have additionalProperties: false
33+
- reject extra keys
34+
35+
2. MUST NOT:
36+
- accept wrapper {tool,payload}
37+
- accept game/workspace/sample JSON
38+
- contain fallback/compatibility logic
39+
40+
## VALIDATION
41+
42+
Codex must verify:
43+
44+
- valid tool JSON → PASS
45+
- wrapper JSON → FAIL
46+
- parent JSON → FAIL
47+
48+
## REPORT
49+
50+
docs/dev/reports/schema_lock_enforcement_11_143.txt:
51+
- schemas checked
52+
- schemas modified
53+
- validation results
54+
55+
## FAILURE
56+
57+
FAIL if any schema:
58+
- allows extra properties
59+
- accepts invalid structure

0 commit comments

Comments
 (0)