Package versioned OBW schema documentation (by Codex)
This commit is contained in:
1 parent
8326a23274
commit
7eff8a34f8
2 files changed
+12
No files matched your search
@@ -35,6 +35,15 @@ class PackageAllowlistTests(unittest.TestCase):
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_text('synthetic license placeholder')
|
||||
package.validate(root, False)
|
||||
schema = root / 'docs/formats/obw/schema/1.0/manifest.json'
|
||||
schema.parent.mkdir(parents=True)
|
||||
schema.write_text('{"type":"object"}')
|
||||
package.validate(root, False)
|
||||
unexpected_json = root / 'docs/world.json'
|
||||
unexpected_json.write_text('{"synthetic":true}')
|
||||
with self.assertRaises(RuntimeError):
|
||||
package.validate(root, False)
|
||||
unexpected_json.unlink()
|
||||
for name in ['game.fbm', 'BMH.EXE', 'unit_tests', 'secret.txt']:
|
||||
(root / name).write_text('synthetic refusal fixture')
|
||||
with self.assertRaises(RuntimeError):
|
||||
|
||||
@@ -26,6 +26,9 @@ def validate(directory, windows):
|
||||
allowed |= (len(relative.parts) >= 2 and relative.parts[0] == 'docs' and
|
||||
'licenses' not in relative.parts and file.suffix in {'.md', '.txt', '.csv'} and
|
||||
all(part not in {'analyses', 'agents', 'manuals', 'validation'} for part in relative.parts))
|
||||
# Versioned OBW schemas are authored format documentation, not game data.
|
||||
allowed |= bool(re.fullmatch(r'docs/formats/obw/schema/[1-9][0-9]*\.[0-9]+/[a-z][a-z0-9_-]*\.json',
|
||||
relative.as_posix()))
|
||||
# App-local UCRT deployment must ship the whole redist set, core forwarders included.
|
||||
allowed |= (windows and len(relative.parts) == 1 and
|
||||
bool(re.fullmatch(r'(?:vcruntime\d+(?:_\d+)?|msvcp\d+(?:_\d+|_atomic_wait|_codecvt_ids)?|'
|
||||
|
||||
Reference in new issue
Block a user