Releases: wzsisshadiao-crypto/dq-questionbank-core
Release list
v1.1.1 - AI-import inbox and LaTeX regression lock
Release v1.1.1 - the delivery-path wave.
The two contracts that gate a finished AI/coding-agent import before it may reach the question bank, plus the guides that teach the complete path.
- AI-import inbox (
dq_questionbank.import_inbox, schemaai-inbox-batch/v1): channels deliver a batch directory; the receiver computes the manifest SHA-256 itself (a digest declared by the delivering channel is never trusted).register_batchanchorsbatch_id + manifestinto aconfirmation_digest, or leaves the batchblockedwith findings (missing/undeclared question files, malformed ids, unknown verdicts).verify_receiptrecomputes the anchor immediately before transfer, so any post-registration edit - tamper or drift - is detected. Human review verdicts (passed/fixed/rejected) are validated against the declared file list. - LaTeX regression lock (
dq_questionbank.latex_regression+ nine checked-in cases): every case pins detect (expect_issue_types: double superscript/subscript, malformed\frac), count (expect_fix_countvia the shared stats contract), and repair (expect_equals/expect_contains/expect_not_contains/expect_no_faults_after) in one assertion. Locked edges: coordinate pairs and intervals never merge; three-column relation chains rejoin pair by pair; differentials go upright only inside integrals. Run anywhere:python -m dq_questionbank.latex_regression. - Guide: OCR + AI Coding import (
docs/ocr-ai-coding-import.md): the six-stage delivery path end to end - OCR pass to markdown -> first import under the work-file contract -> model self cross-check against page images -> independent checker thread (pdf_postflight) -> inbox registration -> human review and anchored transfer. - Guide: LaTeX discipline (
docs/latex-regression.md): one shared detector for the correction panel and the quality scan, the detect-count-repair trinity, and the change ritual for locked cases.
Fix: filesystem paths can no longer leak into introspected signatures and the public API manifest (default argument resolved in the function body; the manifest test now rejects drive letters and home directories).
Full changelog: https://github.com/wzsisshadiao-crypto/dq-questionbank-core/blob/main/CHANGELOG.md
Install: pip install dq-questionbank-core==1.1.1
v1.1.0 - coding-agent import wave
Release v1.1.0 - the coding-agent import wave.
Six pure modules extracted from the production import pipeline, each with deterministic tests and documentation:
- Word macro question-ID expansion (
dq_questionbank.word_macro_id): the insert box accepts short references (6,DLLG_2025_6,KY SX SF SEU 2025 4) and expands them against a subject/school/year memory. Whitespace equals underscores, comma batches expand all-or-nothing, legacy ranges pass through, and ambiguous input returnsNoneso the caller hands the raw text to the server instead of guessing. - Coding-agent work-file contract (
dq_questionbank.coding_agent_workfile, schemacoding-agent-workfile/v1):validate_work_filereports schema, duplicate-number, status, empty-text, and missing-note violations plus any pipeline-owned field the agent file must not carry;transition_work_statusenforces the transcription loop without mutating its input; writes are atomic and reads tolerate a UTF-8 BOM. Guide:docs/coding-agent-import.md. - Read-only PDF postflight scanner (
dq_questionbank.pdf_postflight): stagedqNN.jsoncandidates are scanned for numbering gaps, duplicates, missing identity fields, declared-vs-computed content hashes, and optionalmanifest.jsondigest agreement - findings are data, not exceptions. - Paper metadata contract (
dq_questionbank.pdf_metadata): a volume fails closed unless subject, controlled-vocabulary question type, and source are explicit and every question agrees with the first row; deployments may pass their own vocabulary. - Import tag identity (
dq_questionbank.pdf_identity):normalize_import_tagcanonicalizesAH2026/ah_2026;job_matches_tagaccepts a job id only when it equals the tag or extends it with exactly one known runtime namespace. - LaTeX compatibility repairs (
dq_questionbank.latex_compat): the$A$,$\quad B$PDF degradation footprint is restored only when both sides are relation expressions; bare differentials become upright\mathrm{d}only inside integral math spans; both repairs count their fixes.
Full changelog: https://github.com/wzsisshadiao-crypto/dq-questionbank-core/blob/main/CHANGELOG.md
Install: pip install dq-questionbank-core==1.1.0
v1.0.0 - first stable release
DQ QuestionBank Core v1.0.0 — first stable release
v1.0.0 marks the completion of the open-source migration plan: the five
planned capability batches are all shipped, the four architecture issues
(#1 schema migration, #2 quality contract, #5 review workflow, #6 Word
publishing) are closed, and the remaining open issues are the five
community-input fixture requests that exist to collect legally shareable
corpora from outside contributors.
What the project is
Database-neutral, dependency-light infrastructure for structured
educational questions: a normative JSON document model, deterministic
quality checks, a review-first import pipeline, reference storage
adapters, and managed Word publishing — all synthetic-data only, no
production content.
The road here (14 pre-releases, 37 merged PRs, 35 closed issues)
- Foundation — canonical schema, validation, format registry, CLI.
- Visual workspace batch — structured formula editing, active-field
tracking, scroll sync, soft-delete recycle bin, keyboard activation. - Import & review batch — six synthetic intake cases (JSON/CSV/DOCX/
PDF-style), digest-bound candidate sessions, configurable mapping
import, OMML→LaTeX adapter. - Daily question work batch — revision-bound quality findings,
deterministic LaTeX repair rules, asset-repair and formula-image
evidence contracts, SQLite + filesystem reference storage, safe
backup-and-restore drill. - Word publishing batch — managed content controls, revision-bound
envelopes, loopback bridge, bundled VBA macro, publishing envelope
documentation.
New since v0.15.0
- Schema 1.1 with a safer migration framework (#1) —
analysis
promoted to a first-class content field; built-inmigrate()with
refuse-to-guess path selection;load_schema/validate_with_schema
handle both 1.0 and 1.1; newSUPPORTED_SCHEMA_VERSIONSand
LATEST_SCHEMA_VERSIONexports; full guide in
docs/schema-migrations.md.
Stability commitments from 1.0.0
- The public Python API recorded in
docs/public-api-manifest.jsonis
stable; changes require an explicit manifest regeneration with
compatibility notes (enforced in CI). - Schema 1.0 documents remain readable and writable; future schema
changes ship with deterministic migrations. - 243 tests across Python 3.10–3.12 in CI; 280 audited public files;
deterministic wiki generation fromdocs/.
Known scope and next steps
- The 2026-08-23 file-level audit against
OPEN_SOURCE_BOUNDARY.md
confirmed all planned batches migrated and the public tree free of
private copies; the remaining eligible-after-review extractions
(review-safety gates, splitters, PDF toolchain, scaling guides, and
frontend modules) are tracked in the public roadmap (#83) as
#84–#100 and land as narrow PRs with synthetic tests. - The five open community-input issues (#28, #30, #40, #43, #48) wait
on external fixture contributions and are not blockers. - 1.1 schema exchange is opt-in; consumers must advertise support.
v0.15.0 - gap-closing batch
What is new
The gap-closing batch: every issue opened during the August migration audit now ships.
- OMML-to-LaTeX import adapter (#56,
dq_questionbank.omml_import): reads native Word math (m:oMath/m:oMathPara) from a DOCX with the standard library only and maps fractions, scripts, roots, delimiters, named functions, and n-ary operators to deterministic LaTeX. Unknown constructs are preserved as text and reported for manual review - never guessed. Symmetric with the Word publishing export direction. - Asset-evidence contract for image repair (#57,
dq_questionbank.asset_repair):AssetRepairProposalbinds the question block, asset reference, current digest, and replacement digest. Binding enforces the storage adapters' safe-relative-path rules; previewing re-verifies both digests; there is deliberately no accept-and-write step in the core. - Formula-image transcription candidates (#59,
dq_questionbank.formula_images): digest-bound review records for rasterized formulas. Theformula_imageflag is the deterministic signal; human transcription records its contributor; missing or drifted evidence fails closed. No OCR engine, external service, or network access. - Safe backup-and-restore drill (#60,
examples/backup_restore_drill.py): backup, verify, restore, and compare phases with SHA-256 manifests over a caller-chosen workspace; verification fails closed on any mismatch, and a tampered backup never overwrites anything. Guide atdocs/backup-restore.md.
Full changelog: v0.14.0...v0.15.0
v0.14.0 - workspace trust batch
What is new
The workspace-trust batch: destructive-looking operations become reversible and the extension contract gets a runnable safe example.
- Soft-delete Recycle Bin (#58): recycling a question keeps it in the canonical payload - collection exports keep it until permanent delete - restoring returns it to its original position, and permanent delete removes it for real while clearing derived selections and marking the workspace unsaved. Covered by a Node
vmlogic suite driving the realapp.jsstate machine. - Safe plugin-discovery example (#38):
examples/plugin_discovery_demo.pylists installed entry points without loading any plugin code; the--opt-in-loadflag is the only step that executes third-party registrars. Documentation pins the deterministic clean-environment output. - Blank-cell table fixture (#37): an original synthetic table with one intentionally empty cell, proven to keep its shape and the empty-but-present cell through rendering and canonical round-trips.
Full changelog: v0.13.0...v0.14.0
v0.13.0 - frontend quality batch
What is new
The frontend-quality batch: three community-visible rough edges closed.
- Keyboard-friendly Review Center (#16): every review row is focusable with a descriptive aria-label, Enter or Space activates mark-reviewed / undo, child-button activation stays native, and the focus outline is visible in both themes.
- Table-and-math rendering regression fixture (#27): the real
app.jsruns in a Nodevmcontext with a scripted KaTeX double - proving table rows and header cells survive rendering, standalone and table-cell formulas both go through KaTeX, and a rendering failure keeps the source visible while removing nothing. - Source-year filter regression test (#9): the served control, the exact matching predicate, the bundled case's 2025 subset, and the unknown-year empty state.
Full changelog: v0.12.0...v0.13.0
v0.12.0 - reviewable candidate sessions
What is new
The public reviewable import-candidate-session contract completes the review boundary between source extraction and persistence (#5).
ImportCandidateSession/ImportCandidatewrap the canonical digest-bound session documents in stable public dataclasses -from_sessionverifies the digest,to_sessionreproduces the document exactly, and typed views never drift from the wire format.- Parser identity is retained next to source evidence (
parser.identity), so a review UI can always show which extraction produced a candidate. - Deterministic candidate revisions: candidates start at
revision: 1; a reviewed edit bumps the revision and rebinds the question digest. Plain accepts and rejects never touch it. - Explicit states:
decide()moves candidates pending -> accepted/rejected and fails closed on stale digests or already-reviewed candidates;export_accepted()returns a canonicalQuestionSetand never persists. - Stable fixtures for pending, reviewed (accepted with edit), rejected, and exported states; profile-extension guidance in
docs/review-sessions.md.
Safety
- No candidate state implies persistence or AI approval.
- No private prompt, provider wiring, source document, or production schema is included.
Full changelog: v0.11.0...v0.12.0
v0.11.0 - writable reference SQLite storage
What is new
The first writable SQLite storage reference example, closing the storage gap flagged in #2.
SqliteStorageAdapterimplements the publicStorageAdaptersave/load contract using only the standard-librarysqlite3module - one canonical-JSON row per question-set identifier.- Deterministic persistence: sorted canonical JSON, one transaction per save. Saving an existing identifier replaces the row entirely (documented last-write-wins); no partial writes are observable.
- Fail-closed loads: unknown ids raise
KeyError; deserialization to a different id raisesValueError. Identifier rules match the filesystem adapter. - Runnable demo:
python examples/sqlite_storage_demo.py --db demo.sqlite3builds a disposable database from the bundled synthetic fixture and validates the round trip through the public validation API. contains/stored_idshelpers for deterministic state inspection; docs indocs/sqlite-storage.md.
Safety
- The core stays database-neutral: this is a reference example, not the default backend, and it never opens or migrates a production database.
- No SQLite artifact is committed;
.gitignorealready excludes*.db/*.sqlite3.
Full changelog: v0.10.0...v0.11.0
v0.10.0 - revision-bound quality findings
What is new
The public revision-bound quality-finding contract (dq_questionbank.quality_findings) - the boundary a Quality Center integrates against.
QualityFindingbinds a question id, an exact target field path (stem.blocks[1],choices[0].content), a rule id, the ruleset version (quality/1), and SHA-256 input fingerprints over every field the rule read - incorporating the cross-field design raised in the issue #6 discussion.detect_quality_findingsruns the deterministic LaTeX rules over math blocks in stems, solutions, and choices; repairable sources carry preview-only repair data, and nothing is ever rewritten automatically.finding_statereturnscurrent/stale: changing any declared dependency makes a finding stale, while unrelated edits never do.judge_findingrecords human accept/reject decisions as a separate operation that fails closed withStaleFindingErroron stale content, binding the finding's own fingerprint.- Stable serialized fixtures for current, stale, accepted, and rejected findings, plus contract documentation in
docs/quality-findings.md.
Safety
- Detection, judgment, and persistence remain three separate operations.
- Unknown serialized fields and unsupported severities/decisions fail closed.
- No private correction rules, learned feedback, or production content is included.
Full changelog: v0.9.0...v0.10.0
v0.9.0 - deterministic LaTeX repair rule set
What is new
The first deterministic LaTeX repair rule set: several bounded repairs now work together behind one preview contract instead of living as isolated ideas.
latex-bare-function-names—sin x + cos xbecomes\sin x + \cos x, with word-boundary checks so\sin,assistant, andsinuousnever match;\text{...},\mathrm{...}, and\operatorname{...}regions are preserved.latex-delimiter-spacing—\left( x+1 \right)becomes\left(x+1\right); only the semantically empty whitespace directly inside the delimiter pair is dropped.latex-operator-spacing—x + 1becomesx + 1by collapsing two or more spaces next to+ - = < >; single or missing spacing is never introduced or removed, and\text{a + b}stays verbatim.repair_latex_sourcecomposes the three new rules plus the existinglatex-missing-closing-bracerepair in a fixed order and reports every applied rule ID onapplied_rules.
Safety
- Mismatched plain delimiters such as
(x+1]are never rewritten; they return thelatex-mismatched-delimitersmanual-review finding with the source untouched. - Every outcome keeps the original
sourcevisible next to the proposedlatex, so a reviewer always sees the result before a question changes. - New public API symbols are recorded in the stable API manifest; the public-tree audit now covers 212 files.
Full changelog: v0.8.0...v0.9.0