您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

11KB

Verification log - Foundry 1.0

Date: 2026-11-26. Machine: Windows 11 Pro 10.0.26200, PowerShell 7.6.7, git 2.53.0. Tools: cc65 cl65 V2.19 - Git cc3c40c (in C:\Development\Commodore\cc65-snapshot-win64 (1)\bin, found on PATH); VICE 3.10 GTK3 win64 (in C:\Program Files\GTK3VICE-3.10-win64\bin, not on PATH, found through the install-folder search). Both install paths contain spaces, and cc65's contains parentheses.

Each run writes a full per-check table and the exact command list to tests/results/latest.md (not committed).

1. Automated suite

pwsh -File tests/Run-FoundryTests.ps1

Outcome: 108 passed, 0 failed, 0 skipped (about 4 minutes). Generated test repos went to %TEMP%\Foundry Tests\run <timestamp>\My C64 Projects\<name with spaces>.

Area What was checked Result
Brief validation Both examples and 11 valid test briefs pass approved-mode validation pass
Schema 19 brief files match schema/project-brief.schema.json; an invalid platform is rejected pass
Conflicting constraints BASIC 7.0 override on a C64, 80 columns on a C64, BASIC override vs. smooth-animation, on-Commodore build with cc65: each exits 4 with a CONFLICT that asks the user which constraint to change, and the generator refuses (nothing created) pass
Override rules Compatible override (ca65 instead of recommended C) generates and is documented; language differing from the recommendation without an override is an error; an override that is not applied is an error pass
Dual-target rules Strategy/target mismatch is a conflict; missing strategy is reported pass
Traceability Unknown requirement reference and unlinked requirement are errors pass
Drafts A paused draft resumes at first-release and repeats its saved open question; New-FoundryDraft.ps1 creates a draft and refuses to overwrite one; drafts fail approved-mode validation; an unapproved brief is refused by the generator pass
Generation (normal entry point tools/New-FoundryProject.ps1) 13 briefs (both examples, C128 40-col BASIC 7.0, C128 40-col ca65, C128 40+80 C, BASIC 7.0 80-col, dual native C, dual C64-mode BASIC, dual C64-mode C, on-Commodore BASIC V2, on-Commodore BASIC 7.0 80-col, ca65 override, unverified native assembler) pass
Generated files README, AGENTS, CLAUDE, docs (spec, toolchain, milestones, manual tests, verification status), project.json with resolved config, .gitignore, .gitattributes, src, tools; every requirement in the spec, every target in spec and M0 manual tests; on-Commodore scripts only where relevant pass
Template completeness No {{...}} left in any generated text file; unknown placeholder stops generation pass
Git Branch main, one commit, clean tree, no remote. Without a Git identity (GIT_CONFIG_GLOBAL = empty file), files are staged and not committed, and the message says how to commit pass
Paths with spaces Every generated repo and every tool path contains spaces pass
Existing destinations Non-empty folder, existing Git repo and existing file refused, with content hashes unchanged; empty folder accepted; destination inside the Foundry refused; bad\|name, trailing dot. and CON refused pass
Interruption and retry Simulated failure after the templates, files and git steps: no destination, no staging left, retry succeeds; an existing empty folder is restored; a stale staging folder from a killed run is removed on the next run pass
Toolchain: build + VICE smoke check-prereqs.ps1, build.ps1, smoke.ps1 in each generated repo: 16 targets PASS, unverified native-assembler target reports MANUAL (exit 3) as designed pass
Interactive run tools/run.ps1 starts x64sc (Traffic Control 64) and x128 (Text Viewer), and the processes stay running pass
On-Commodore workflow to-commodore.ps1 -> D64 -> from-commodore.ps1 round trip leaves src/main.bas identical; a change saved to the transfer disk (simulated with petcat + c1541) arrives in src/main.bas pass
Missing tool With the x128 entry pointing to a non-existent executable, check-prereqs.ps1 and smoke.ps1 exit 2, naming the tool, the first command (winget install --id VICE-Team.VICE.GTK3 -e) and what stays unverified pass

2. Example repositories (generated through the normal entry point)

pwsh -File tools/New-FoundryProject.ps1 examples/traffic-control-64/brief.json
pwsh -File tools/New-FoundryProject.ps1 examples/c128-text-viewer/brief.json
Repo Result
C:\Development\Commodore\Foundry Projects\traffic-control-64 Generated, initial commit on main. Smoke PASS in x64sc (PAL): title, score line, N-S: GREEN, E-W: RED, WALK: OFF on the expected rows, C64 KERNAL reset vector. The screenshot build/smoke/c64/screen.png was inspected: crossroads, crosswalks, green N-S lamp, red E-W lamp.
C:\Development\Commodore\Foundry Projects\c128-text-viewer Generated, initial commit on main. The D64 holds VIEWER, SAMPLE, LFSAMPLE and CRLFSAMPLE. Smoke PASS in x128 -80col, autostarted from disk: the VDC read-back shows the title, SAMPLE OPENED OK: 6423 BYTES and DRIVE STATUS: 00, ok,00,00, and $D7 = $80. The screenshot build/smoke/c128-80/screen.png (VDC window) was inspected.

3. Experiments that shaped the design

Command / experiment Outcome
x64sc -moncommands with break + command ... bsave Memory saved, but the monitor stays open and VICE never exits. Rejected.
Same with trace exec <addr> (non-stopping) + -limitcycles + -exitscreenshot Memory saved, VICE exits by itself (exit code 1 from limitcycles), screenshot written. Adopted.
x128 -80col -exitscreenshot Captures the VDC window. -exitscreenshotvicii captures the VIC-II window.
VDC text check VDC RAM is not CPU-visible, so the C starter copies VDC rows 0-3 into smoke_probe[] (registers 18/19/31) before the tracepoint. The screen codes match the upper/lower-case encoding.
c1541 -write file "name,s" Writes a SEQ file (not stated in the manual; observed).
petcat -w2 then petcat -nh -2 Byte-identical round trip; -f is needed to overwrite.
cl65 -t c64 -C c64-asm.cfg -u __EXEHDR__ -g -Ln Local ca65 labels such as smoke_ready appear in the VICE label file.
Bugs found by these checks and fixed Windows strips a trailing dot from paths (destination check now uses the raw name); run.ps1 joined -pal and -autostart into one argument (fixed; covered by the interactive-run test); the drive reports ok in lower case in the upper/lower-case set (expectation corrected); signal lamp order and contrast in Traffic Control 64 (fixed after viewing the screenshot).

4. Still pending

Item Why pending How to finish
Real hardware (C64, C128 + 80-column monitor) No hardware in this environment; not required by either example brief Follow “Real hardware” in each generated docs/manual-tests.md; record results in its docs/verification-status.md
Fresh-session handoff with a different agent Needs a new interactive session docs/manual-verification.md section E
Interactive interview end to end Needs a person answering questions docs/manual-verification.md section B
asm-onboard recipe (native assembler on the C64/C128) The assembler is user-supplied and not available here Carry out the validation plan in the generated docs/toolchain.md, then mark the combination verified in catalog/recipes.json
ca65-only programs on the C128 80-column screen No starter writes to the VDC from assembly yet Validation plan in catalog/recipes.json (cc65 combo c128-native/vdc-80/asm-ca65)
winget install VICE-Team.VICE.GTK3 install location VICE was installed from the zip on this machine. The winget install folder is searched (%LOCALAPPDATA%\Microsoft\WinGet\Packages\VICE-Team.VICE.GTK3*\*\bin) but not observed Install with winget on a clean machine and run tools/check-prereqs.ps1; if VICE is not found, set VICE_HOME and update searchPaths in the catalog
NTSC smoke run Smoke tests use PAL; NTSC is selectable (-Video ntsc in run.ps1) but not automated Traffic Control 64 MT2.6 covers it during implementation

5. Addendum 2026-11-26: mouse-1351 capability

Added the Commodore 1351 mouse as a catalog capability (C, mixed C + ca65, ca65 and native assembler; not BASIC V2 / 7.0). Briefs that list it get -controlport1device 3 (VICE: control port 1 = Mouse (1351)) in their resolved emulator arguments, so tools/run.ps1 and tools/smoke.ps1 attach the mouse; docs/toolchain.md carries the mouse-grab note (Alt+M in the VICE 3.10 GTK3 default hotkeys, from hotkeys/hotkeys.vhk; Alt+Q only with the WinVICE legacy file).

pwsh -File tests/Run-FoundryTests.ps1

Outcome: 116 passed, 0 failed, 0 skipped.

New check Result
mouse-1351-c (C64, C): validates, generates, builds; smoke test in x64sc with -controlport1device 3 finds ‘MOUSE OK’ (cc65 c64_1351_mou installed via mouse_install) pass
conflict-basic-mouse (BASIC V2 + mouse-1351): exit 4 with a CONFLICT that asks the user which constraint to change; generator refuses pass
Resolver adds the mouse port option only when the capability is listed pass

Still manual: pointer movement and button presses with a grabbed host mouse (headless VICE has no host mouse), and the C128 driver c128_1351_mou (present in the cc65 snapshot, not exercised by a test brief).

6. Addendum 2026-11-26: Foundry 1351 reader replaces cc65's driver

cc65's c64_1351_mou wanders under VICE 3.10 with no mouse input. Headless x64sc with -controlport1device 3 and nothing touching the mouse:

Reader Frames Pointer moves with no input
cc65 c64_1351_mou (mouse_install + mouse_info once per frame) 780 775 (159,99 -> 221,165)
templates/capabilities/mouse-1351/src/mouse1351.s (ms_poll once per frame) 810 0

Raw POTX/POTY read once per frame at raster 100 without settling: mostly $40/$41 with spikes such as $72/$77, which the cc65 delta maths turns into jumps. The Foundry reader (from stonehold-64 M2.2) selects control port 1 and waits 12 raster lines (> one 512-cycle SID POT sample) with IRQs off before reading. It is now added to generated C / mixed C + ca65 repos on c64 / c128-c64mode that list mouse-1351 (capabilityFiles in the catalog).

pwsh -File tests/Run-FoundryTests.ps1

Outcome: 117 passed, 0 failed, 0 skipped. mouse-1351-c now also checks MOUSE STILL (no pointer movement over 100 idle frames). Still manual: movement with a grabbed host mouse.

Knowledge Engine (branch feature/knowledge-engine, 2026-12-02)

pwsh -File tests/Knowledge.Tests.ps1
pwsh -File tests/Run-FoundryTests.ps1

Outcome: Knowledge suite 17 passed, 0 failed, 0 skipped (real PostgreSQL 16 + pgvector 0.8.7 container, real Ollama nomic-embed-text, scratch database). Foundry suite 117 passed, 0 failed, 0 skipped, including the new checks that every generated repo has tools/knowledge.ps1, the skill, the knowledge policy with its project key, and a project.json that points at the module. A generated project was also loaded by hand (. ./tools/knowledge.ps1), stored and found an entry under its slug, and degraded to a warning when the Foundry was unreachable. Details and limits: knowledge-engine.md.

Powered by TurnKey Linux.