[pull] master from walkframe:master - #21
Open
pull[bot] wants to merge 101 commits into
Open
Conversation
Three deviations from Microsoft PICT's documented model syntax
(pict/doc/pict.md), fixed in both the TypeScript and Python ports:
1. Numeric IN sets rejected. `IN {512, 1024}` — the value form used in
PICT's own documentation — threw "Unexpected token in array" because
the set parser only accepted string tokens. Now numeric elements are
accepted (TS + Python).
2. LIKE treated regex metacharacters as special (TS only). `LIKE "4.8*"`
matched "4x8.1" because `.` was passed through to the regex verbatim.
All metacharacters are now escaped, then only `*` and `?` are restored
as wildcards. (Python already used re.escape and was correct.)
3. Sub-model order was mandatory. `{ A, B }` without `@ N` was rejected
and treated as a constraint. Per spec the order is optional and, when
omitted, defaults to the global order (/o). The order is now optional
and resolved to the global strength at generation time.
Tests updated/added on both sides. Full suites green
(TS: 179 passing, Python: 68 passing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds comment classification to the PICT parser. Each maximal run of `#` lines becomes a CommentBlock, classified as either a field description (attached to the parameter directly below it, no blank line between) or freestanding documentation (separated by a blank line, or sitting above a constraint / non-parameter line). - `classifyComments()` in parse.ts is the single source of truth, reused for prompt assembly and editor syntax highlighting. - `CommentBlock` type and `classifyComments` are exported from the package. - `PictModel.comments` exposes the classified blocks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…antics
Adds regression tests on both ports for the spec-conformance fixes:
- numeric and float IN sets (`IN {512, 1024}`, `IN {2.5, 3}`)
- LIKE treats non-wildcard chars (e.g. `.`) as literals
- LIKE `?`/`*` wildcard matching
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- IN accepts numeric sets (e.g. IN {512, 1024}), not just strings
- Sub-model `@ N` order is optional and defaults to the global order
- Clarify LIKE treats non-wildcard characters as literals
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(pict): spec-conformance fixes + comment classification
Minor release: PICT spec-conformance fixes (numeric IN sets, LIKE literal matching, optional sub-model order) plus comment classification. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add editors/vscode: syntax highlighting, live diagnostics, and covering-array generation for PICT model files, powered by the bundled CoverTable engine. Includes a status-bar footer (strength/criterion/sorter/case + Generate) with cancellable progress, TSV/CSV output, and a tag-triggered GitHub Actions workflow that publishes to the VS Code Marketplace (and optionally Open VSX). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pnpm/action-setup needs a version; add packageManager to editors/vscode so the release job can install dependencies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a VS Code Extension section to the root README and a dedicated docs page (install, features, settings), link it from the online PICT tool, and add it to the sidebar. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add .github/dependabot.yml to stop Dependabot PRs for /docs, including security updates (open-pull-requests-limit: 0 plus ignore "*"). The Docusaurus site generates many low-value PRs for transitive devDependencies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…game reheat Add `Controller.optimize()` / `Controller.optimizeParallel()`: a simulated-annealing post-process that shrinks a greedy covering array (same coverage/constraints, fewer rows). Config (strength/constraints/comparer) is read from the Controller so it can't drift from the `make` run. - Cooperative island model on worker threads: a portfolio of seeds × move strategies shares a SharedArrayBuffer blackboard; laggards adopt the global best, scouts stay independent. Node (worker_threads) and Web (Blob module workers) backends, chosen by capability, single-thread fallback otherwise. - Anytime + cancellable via `OptimizeTuning.signal` (AbortSignal); returns the smallest verified array found so far. - Endgame reheat: when an anneal run stalls it restores the best config and jumps the temperature back up so the last row can crack. Row-count gated (`reheatMaxRows`) so it rescues tight small-array endgames without disrupting the bulk descent of large arrays (10^20). `reheatStuck=200000`, `reheatFrac=0.3`. - VS Code extension: optional optimize pass (off by default), live progress + cancel, standalone vscode-free worker bundle (`workerUrl`) so parallelism works when bundled, preserve-focus result so re-generate stays available. Docs note the non-obvious finding that reducibility is a property of the starting array's structure, not its row count — a plain `make()` array optimizes further/faster than a smaller `random best-of-N` one. `evidence/` holds independently-verified results (each `missing_pairs: 0` via `evidence/repro/verify_ca.py`), measured from a single `make()` start, plus the best-minimum arrays reached per case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirror the TypeScript `optimize.ts` in Python: `Controller.optimize()` and `Controller.optimize_parallel()` (alias `optimizeParallel`) run the same simulated-annealing row reducer — identical energy model, targeted/min-collateral moves, endgame reheat (`reheat_stuck=200000`, `reheat_frac=0.3`, row-count gated by `reheat_max_rows=96`), cooperative island-model portfolio (same DEFAULT_PORTFOLIO, 2 scouts, patience 3), and default tuning. Parallelism uses `multiprocessing` + shared memory instead of worker_threads/SharedArrayBuffer. Correctness verified by `test_optimize.py` (13 tests, mirrors optimize.test.ts). Pure-Python is ~15-30x slower per iteration than bun, so hard endgames (e.g. `4^1 3^39 2^35`: 21->20) need a much larger time budget than the TS reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A project skill documenting how to use the covertable library (make() options, constraints, PICT models, weights/presets/subModels, and the SA post-processor Controller.optimize / optimizeParallel). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- verify_ca.py: close the evidence file via `with open(...)` - optimize.py: import multiprocessing via a single `from` form (get_context) - optimize.py: explain the best-effort empty `except` on the progress queue - test_optimize.py: drop the unused `pytest` import - optimize.test.ts: drop the unused `all` import Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: SA optimize post-processor (Controller.optimize / optimizeParallel) + Python port
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The SA optimizer's parallel backend dynamically imports node:worker_threads,
which the rspack client bundle can't resolve ("Unhandled scheme"), breaking
the Cloudflare Pages build. Mark it external in the client build (it's never
reached in the browser — the runtime picks the Web Worker backend).
Also expose the optimizer in the interactive PICT tool: an "Optimize (SA)"
toggle with a time-budget selector, run single-threaded in the generate
worker. Includes a note that value weights are ignored while optimizing
(coverage and constraints are preserved, not value frequencies).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )