Make Gitea core validation source-only
This commit is contained in:
@@ -32,7 +32,7 @@ S:\Game Hacking\Eushully\Himegari\ ← workspace root (three siblings)
|
||||
├── global.json pins the validated .NET 8 SDK feature band
|
||||
├── .editorconfig / .gitattributes UTF-8, indentation, text/EOL, and binary-file policy;
|
||||
│ tracked source and generated references use canonical LF
|
||||
├── .github/workflows/core-validation.yml planned Ubuntu-hosted core gate; source-only audit pending fix
|
||||
├── .gitea/workflows/core-validation.yml read-only Ubuntu source-only core gate for the private Gitea remote
|
||||
├── run-godot.ps1 / run-godot.cmd tracked development launcher + Windows wrapper;
|
||||
│ resolves Godot/game-root from parameters, environment,
|
||||
│ PATH, and the conventional sibling install
|
||||
|
||||
@@ -52,10 +52,10 @@ claiming portable exports.
|
||||
| ADV font discovery/raster fidelity | `Age.Engine.Text` remains OS-neutral. On compatible ACP-932 Windows, `auto` selects the separate exact-to-request `Age.Engine.Text.Windows` GDI gray-4 backend. Otherwise Godot TextServer supplies Unicode masks and metrics from ordered system-font substitutions in `godot/config/himegari-text-rendering.json`; this policy is explicitly not GDI pixel-exact. Immediate `0x204`/`0x205`, live ADV, retained History, and the wait atlas all enter ordinary RGBA surfaces/retained handles | Three Mincho/Gothic regular/bold samples byte-match an independent Unicode GDI oracle. A live `SC0000@0x869` trace proves that the `AGE Patch.exe`/`jprun.dll` wrapper overrides authored Mincho to MS Gothic: 13 captured masks match Gothic byte-for-byte and Mincho 0/13. This is wrapper behavior, not the true-native default. Forced exact and forced portable self-tests cover immediate, live, and History rasterization, bounded caching, complete-line materialization, retained ordering, alpha/tint/fade, transforms, clipping, capture, HIDEWIN suspension, partial erase/republication, reset, and teardown. Gameplay `Label` pools and overlay projection are gone | Optionally expose realized-face overrides through future launch profiles when wrapper compatibility is desired; independently produce and smoke-test Linux/macOS exports, confirm installed family availability/fallback selection there, and keep the GDI project out of non-Windows deliverables |
|
||||
| Filesystem semantics | Several filename and containment comparisons use `OrdinalIgnoreCase`; installed assets are conventionally uppercase | Needs validation on case-sensitive filesystems; may hide casing or containment mistakes | Add Linux/macOS tests with mixed-case synthetic roots and use filesystem-appropriate containment rules |
|
||||
| Save/profile/settings storage | `Sys4PersistencePaths` models AGE's independent `SAVEPATH` and `REGFILEPATH` resolutions. Godot replaces Himegari's related profile directory with `user://`, yielding `user://SAVE` for native S3SD/S4SD/S3RT files and thumbnails plus `user://SYS4REG.INI` for the BOM-less CP932 options file; the preserving writer changes only its nine `[sound]` keys | Save payloads and engine options are isolated together without changing either native format. Native/drop-in resolution remains available through `USEAPPDATAFOLDER` plus both SYS4INI paths. A single-root override is rejected when `SAVEPATH` is not beneath `REGFILEPATH`, preventing cross-profile guesses | Expose explicit profile/native selection through the future launcher and allow independent overrides for profiles whose two native paths are unrelated. Validate CP932 availability, replace/flush, case, permissions, and interrupted-write behavior on each export target |
|
||||
| Game-install, runtime metadata, and repository discovery | `GameRootSelection` accepts `--game-root`, then probes the executable directory and current working directory for `SYS4INI.BIN`; on Unix the frontend prefers inherited shell `PWD` because Godot may change the process directory during project startup. Godot injects the selected root into its catalog and loose-first ALF store. `Himegari.csproj` embeds generated `build/opcodes.json`, and the frontend loads that assembly resource rather than `Paths.OpcodesJson`. `Paths.cs` remains a development/test locator; its page-map use is compiled only for `TOOLS` builds | Installed game data and packaged VM metadata no longer depend on the workspace sibling layout. The Linux export passed an explicit absolute game root outside the repository and read the installed archives. Exported automatic page maps use `user://diagnostics/page-maps`; editor/development runs preserve `build/page-map-<SCENE>.jsonl` | Let the future profile launcher pass `--game-root`, and run executable-directory/CWD plus case/permission smoke gates on Linux and macOS |
|
||||
| Game-install, runtime metadata, and repository discovery | `GameRootSelection` accepts `--game-root`, then probes the executable directory and current working directory for `SYS4INI.BIN`; on Unix the frontend prefers inherited shell `PWD` because Godot may change the process directory during project startup. Godot injects the selected root into its catalog and loose-first ALF store. `Himegari.csproj` embeds generated `build/opcodes.json`, and the frontend loads that assembly resource rather than `Paths.OpcodesJson`. Development/test `Paths.cs` finds the repository by tracked `global.json`, solution, and opcode-map markers rather than a checkout-directory name | Installed game data and packaged VM metadata no longer depend on the workspace sibling layout. The Linux export passed an explicit absolute game root outside the repository and read the installed archives; a source-only core proof also passes from an arbitrary repository directory name. Exported automatic page maps use `user://diagnostics/page-maps`; editor/development runs preserve `build/page-map-<SCENE>.jsonl` | Let the future profile launcher pass `--game-root`, and run executable-directory/CWD plus case/permission smoke gates on Linux and macOS |
|
||||
| Archive parity oracle | One integration test can launch a machine-local `bin/BinExtractALF.exe`; the binary and matching DLL are ignored and have unverified redistribution terms | Windows-only installed-data helper, not a shipped runtime dependency | Keep it in an explicit private workspace gate; runtime ALF/AAI readers do not depend on it |
|
||||
| Native RE tools | Frida/Ghidra helpers target the original `AGE.EXE`; PE-sieve was tried and replaced by the Frida import-map workflow | Development/research only; no native RE executable is tracked | Keep separate from export requirements; document platform prerequisites per tool |
|
||||
| Python workflow and core CI | The operating guide uses Windows `py -3.11`; `validate.py` launches child tools through `sys.executable` and has POSIX process-group cleanup plus `ps`-based leak auditing | Tracked generated references and the engine solution/project files have canonical LF blobs. A source-only checkout found 501/590 engine cases hermetic, 89 installed-corpus/native-oracle cases still reached by `core`, and one Python bootstrap test coupled to the external corpus. The target Gitea server's known-good baseline is `ubuntu-latest`, checkout v4, setup-dotnet v4, and Gitea-specific artifact upload | Explicitly classify the 89 workspace cases and inject a synthetic opcode corpus fixture, then run the corrected core gate in Gitea. Retain Windows-native GDI parity and private installed-game/runtime checks as separate trusted gates |
|
||||
| Python workflow and core CI | The operating guide uses Windows `py -3.11`; `validate.py` launches child tools through `sys.executable` and has POSIX process-group cleanup plus `ps`-based leak auditing | The 590 engine cases are explicitly split into 502 source-only core cases and 88 `Workspace` installed-data/native-oracle cases; both selections pass with zero skips. The opcode-bootstrap unit injects synthetic observations while production bootstrap retains real-corpus scanning. `.gitea/workflows/core-validation.yml` uses the target server's demonstrated `ubuntu-latest`, checkout/setup-dotnet v4, setup-python v6, and Gitea artifact action baseline. A standalone arbitrary-name, corpus-free repository passes the complete core driver | Confirm the first real Linux run after the rewritten history is pushed. Retain Windows-native GDI parity and private installed-game/runtime checks as separate trusted gates |
|
||||
|
||||
No authored runtime code currently calls native DirectSound, Direct3D, Vulkan, Metal, or OpenGL. Mentions of
|
||||
those APIs in `docs/engine-re.md` describe the original AGE implementation. Both the software-oracle display
|
||||
|
||||
@@ -920,8 +920,8 @@ do not mix mechanical moves with semantic changes.
|
||||
validation remains green, and a Linux Git comparison reports no unstaged EOL drift. The first hosted CI job
|
||||
can therefore target Linux rather than carrying forward a Windows-runner dependency.
|
||||
|
||||
**Linux core workflow (2026-08-03):** item 2 is implemented as `.github/workflows/core-validation.yml`. One
|
||||
read-only `ubuntu-24.04` job provisions Python 3.11 and the SDK selected by `global.json`, reports both resolved
|
||||
**Initial Linux core workflow (2026-08-03, superseded below):** item 2 was first implemented as
|
||||
`.github/workflows/core-validation.yml`. One read-only `ubuntu-24.04` job provisions Python 3.11 and the SDK selected by `global.json`, reports both resolved
|
||||
versions, and invokes the existing asset-independent core driver. Pull requests, `main` pushes, and manual
|
||||
dispatch share the job; branch-local concurrency cancels superseded runs, and seven-day validation-log upload
|
||||
occurs only after failure. The workflow has no cache, secrets, private corpus, Godot runtime, packaging, or
|
||||
@@ -947,6 +947,19 @@ do not mix mechanical moves with semantic changes.
|
||||
solely as a failed historical experiment. This resolves the committed-binary portion of item 3, but
|
||||
Kelebek-derived source/data and the user-owned project license choice remain unresolved for wider distribution.
|
||||
|
||||
**Hermetic Gitea core workflow (2026-08-03):** the correction is complete. The 590 engine cases are now
|
||||
explicitly partitioned into 502 source-only cases and 88 `Workspace` installed-data/native-oracle cases;
|
||||
both selections pass with zero skips in the populated workspace. The one accidentally coupled synthetic
|
||||
asset-store test now builds its catalog fixture instead of being excluded. `test_opcodes.py` injects 248
|
||||
synthetic observations derived from the canonical observed-opcode set, while production `--bootstrap` still
|
||||
scans the real corpus by default. Development/test repository discovery uses tracked marker files rather than
|
||||
the checkout directory name.
|
||||
|
||||
The workflow moved to `.gitea/workflows/core-validation.yml` and matches the same-server baseline:
|
||||
`ubuntu-latest`, checkout/setup-dotnet v4, setup-python v6, and Gitea-specific artifact upload. A standalone
|
||||
source-only repository under an arbitrary name passes the complete core driver without sibling game/extracted
|
||||
data. The first actual Linux runner result remains pending until the user adds and pushes the selected remote.
|
||||
|
||||
**Not cleanup targets:** generated `build/` output, the two intentional solution files, historical
|
||||
`docs/superpowers/` plans/specifications, and fidelity-specific complexity that is directly covered by the
|
||||
native ABI. Reorganization is successful when ownership and reproduction become clearer, not when the raw
|
||||
@@ -1293,10 +1306,9 @@ layer's rendering diverges from ADV; save layout.
|
||||
---
|
||||
|
||||
## 8. Immediate next step
|
||||
Continue step 5 of the **codebase consolidation** maintenance slice by making the Linux core gate genuinely
|
||||
source-only: classify the installed-corpus/native-oracle engine tests as an explicit workspace suite, inject a
|
||||
synthetic corpus seam into the opcode-bootstrap unit test, and align the workflow with the target Gitea server's
|
||||
known-good `ubuntu-latest` action baseline. Then make the user-owned project-license and Kelebek-derived-material
|
||||
decisions required before wider distribution. Do not infer a license choice or publish/configure a remote.
|
||||
Continue step 5 of the **codebase consolidation** maintenance slice by adding and pushing the user-selected
|
||||
private Gitea remote, then confirm the first hosted Linux core result. After that, make the user-owned project-
|
||||
license and Kelebek-derived-material decisions required before wider distribution. Do not infer a license choice
|
||||
or configure/publish a remote without the user's explicit direction.
|
||||
Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does
|
||||
not replace Phase B gameplay validation or the open cross-platform gates.
|
||||
|
||||
@@ -26,7 +26,7 @@ whenever a tool's inputs/outputs change.**
|
||||
|
||||
| Tool | Purpose | Run | Reads → Writes |
|
||||
|---|---|---|---|
|
||||
| `validate.py` | Layered project validation front door. `core` regenerates/runtime-checks opcode metadata, lints canonical registries, runs pure Python tooling tests and all .NET engine tests, checks generated opcode references, and runs `git diff --check`. `workspace` adds corpus-derived global generation, the real-data Python suites, full SYS4 decode, and Python RECOVER. `runtime` adds the Godot C# build and forced-portable threaded self-test. `full` combines all phases and adds the booted faithful-wait C# scene sweep. Selected prerequisites are strict: an unavailable game/corpus/Godot requirement fails before execution instead of becoming a green skip. Each gate has a timeout and UTF-8 log under `build/validation/validate-<timestamp>/`; Godot receives an isolated validation-owned user-data/log root there so it cannot read or modify the developer's saves/settings. The final table reports results/durations and a before/after Godot-process leak audit. | `validate.py` (defaults to `--level full`) · `--level core|workspace|runtime|full` · `--godot <console>` · `--game-root <install>` · `--verbose` · `--fail-fast` | sources + selected toolchain/game/corpus prerequisites → console summary + ⚙ `build/validation/validate-*/<gate>.log` |
|
||||
| `validate.py` | Layered project validation front door. `core` regenerates/runtime-checks opcode metadata, lints canonical registries, runs pure Python tooling tests and the 502 .NET cases without the `Workspace` trait, checks generated opcode references, and runs `git diff --check`. `workspace` adds the 88 explicitly traited installed-data/native-oracle cases, corpus-derived global generation, real-data Python suites, full SYS4 decode, and Python RECOVER. `runtime` adds the Godot C# build and forced-portable threaded self-test. `full` combines all phases and adds the booted faithful-wait C# scene sweep. Selected prerequisites are strict: an unavailable game/corpus/Godot requirement fails before execution instead of becoming a green skip. Each gate has a timeout and UTF-8 log under `build/validation/validate-<timestamp>/`; Godot receives an isolated validation-owned user-data/log root there so it cannot read or modify the developer's saves/settings. The final table reports results/durations and a before/after Godot-process leak audit. | `validate.py` (defaults to `--level full`) · `--level core|workspace|runtime|full` · `--godot <console>` · `--game-root <install>` · `--verbose` · `--fail-fast` | sources + selected toolchain/game/corpus prerequisites → console summary + ⚙ `build/validation/validate-*/<gate>.log` |
|
||||
| `test_validate.py` | Pure tests for launcher-equivalent explicit/environment/PATH/conventional resolution precedence, invalid-explicit hard failure, level composition, and final gate ordering. | `test_validate.py` | temporary files only |
|
||||
|
||||
Levels are cumulative around `core`: `workspace` means core+workspace-corpus, `runtime` means core+Godot,
|
||||
@@ -35,14 +35,14 @@ by a failed preflight; rebuild each through its owning tool in this reference. R
|
||||
`--godot`, then `AGE_GODOT_CONSOLE`, then `godot4`/`godot`/`godot-mono` on `PATH`. Game-root resolution uses
|
||||
`--game-root`, then `AGE_GAME_ROOT`, then the conventional sibling install and always requires `SYS4INI.BIN`.
|
||||
|
||||
The planned hosted wrapper is `.github/workflows/core-validation.yml`. A clean source-only checkout audit on
|
||||
2026-08-03 found that `--level core` still runs 89 installed-corpus/native-oracle engine cases and that
|
||||
`test_opcodes.py` bootstraps from the external script corpus. The workflow therefore remains dormant until those
|
||||
tests are explicitly separated from the hermetic core suite; missing data must not become a successful skip.
|
||||
The known-good configuration on the target Gitea server uses `ubuntu-latest`, `actions/checkout@v4`,
|
||||
`actions/setup-dotnet@v4`, and `christopherhx/gitea-upload-artifact@v4`. The future core workflow should match
|
||||
that runner/action baseline, provision Python 3.11, and keep private corpus, Godot runtime, packaging,
|
||||
deployment, and secrets outside the job.
|
||||
The hosted wrapper is `.gitea/workflows/core-validation.yml`. It matches the target server's demonstrated
|
||||
`ubuntu-latest`, `actions/checkout@v4`, `actions/setup-dotnet@v4`, and
|
||||
`christopherhx/gitea-upload-artifact@v4` baseline, adds Python 3.11, and runs only `--level core`. A standalone
|
||||
source-only repository under an arbitrary directory name passes that exact driver without sibling game or
|
||||
extracted data. Repository discovery uses tracked marker files rather than requiring the checkout directory to
|
||||
be named `age-reimpl`. The workflow has no secrets, private corpus, Godot runtime, cache, packaging, or deployment
|
||||
access; failure logs are retained for seven days. Its first actual Linux/Gitea execution remains pending until
|
||||
the rewritten repository is pushed.
|
||||
|
||||
## Optional local binary tools
|
||||
|
||||
@@ -68,7 +68,7 @@ All opcode knowledge (ABI, semantics, provenance, `depends_on`) is hand-edited *
|
||||
|---|---|---|---|
|
||||
| `opcodes_build.py` | Generator + linter for the opcode reference. `--bootstrap` appends entries observed in the Himegari corpus; `--bootstrap-age` appends every missing opcode from the pristine 548-entry AGE catalog as an unobserved compatibility stub. Catalog stubs retain Kelebek's ABI label/argument count so other AGE scripts decode past them, but remain `noop_headless=false`: the VM currently traces/skips them, while coverage continues to report them as unresolved rather than semantically safe. | `--build` · `--lint` · `--bootstrap` · `--bootstrap-age` | `vm-map/opcodes.toml` → ⚙ `tools/age_opcodes_himegari.py`, ⚙ `build/opcodes.json`, ⚙ `docs/opcode-reference.md`, ⚙ `build/opcode-coverage.md` |
|
||||
| `opcodes_model.py` | In-memory model + loader + linter (dangling-ref / confidence-ceiling / vocabulary / dependents). | *Imported by `opcodes_build.py`.* | `vm-map/opcodes.toml` → — |
|
||||
| `test_opcodes.py` | Unit tests for the opcode tooling. | `test_opcodes.py` | — |
|
||||
| `test_opcodes.py` | Unit tests for the opcode tooling. Bootstrap coverage injects 248 synthetic observations derived from the canonical observed-opcode set; it does not read the private script corpus. Production `--bootstrap` still scans the real corpus by default. | `test_opcodes.py` | `vm-map/opcodes.toml` → temporary files only |
|
||||
| `opcode_context.py` | Read-only evidence gatherer for classifying unnamed opcodes (frequency, argc, operand-type signature, neighbours, disasm snippets, Kelebek comment). | `--top 20` · `opcode_context.py 0x1f4 0x71 …` | corpus → stdout |
|
||||
| `validate_opcode_table.py` | Definitive decode-coverage validator (replicates Kelebek's `data_array_end` code/data split). | `validate_opcode_table.py` | corpus → stdout |
|
||||
| `validate_opcode_table_naive.py` | Naïve variant of the above (baseline comparison). | `validate_opcode_table_naive.py` | corpus → stdout |
|
||||
|
||||
Reference in New Issue
Block a user