Skip to content

Real TeX follow-up: repair scopes and explicit-definition coverage #405

Description

@akcorca

Problem and current scope

Semath is a conservative mathematical document analyzer. The practical goal is source-linked definitions and complete, safe edits in author manuscripts, plus grounded constraint checks. The broad STEM-writing program in #345 and its release plan in #354 are superseded (NOT_PLANNED), not completed.

The development corpus pins five arXiv papers (21 TeX files), preserving original source inventories, includes and author macros. See fixtures/real-documents/{sources,tasks}.json, docs/real-document-evaluation.md, and bun run corpus:collect && bun run corpus:evaluate. Original papers remain local and are not redistributed.

Annotation correction

The original 15 navigation annotations were committed before the first query (147218901a2c7d02afbfe24ec854b23f6e3d867f). Further source-context review found that primes-convolution is inside an inactive comment environment, UTF-16 offsets 8812..13517. Its former navigation-success label was invalid. The same spans now identify a separate navigation/rename refusal task.

The corrected 0.19.2 baseline is 3/14 correct navigation, 8 abstentions and 3 input rejections, plus one failed inactive-source refusal. The former 4/15 headline must not be used to compare performance. This source-label correction is not an engine improvement and was not chosen to match the output.

Current results

After #407 (Semath 0.19.3), using unchanged source archives and the corrected annotations:

Field / paper Correct navigation Abstained Input rejected
Machine learning / Attention Is All You Need 1 2 0
Optimization / Adam 2 1 0
Statistics / Variational Inference 3 0 0
Theoretical physics / Origin of Gravity 0 3 0
Number theory / Small Gaps Between Primes 0 2 0
Total 6 8 0

The inactive-source task correctly refuses both definition navigation and rename, without destinations or edit proposals. There are no wrong returned destinations in this small development set. This is limited task coverage, not broad accuracy or author usability evidence. Labels are agent-authored and not independent human/blind annotations. Complete rename sets remain unscored.

Completed repairs

Remaining work, in order

  • Support bounded coordinated declarations where source establishes identity: K/V in Attention and v_t in Adam. Keep unsupported or ambiguous evidence neutral.
  • Design bounded source-preserving support for custom equation aliases. Gravity now ingests, but its \be/\ee notation is not recognized as math; all three navigation tasks abstain.
  • Handle long documents within explicit analysis bounds. The number-theory M_1/M_2 declarations are beyond wasmtex's 10,000-node CST parsing budget, not missing because of theorem scope. Do not raise limits to fit the score; consider bounded region analysis with explicit truncation reporting.
  • Independently label complete rename sets before claiming safe real-document edits. Review section boundaries, decorated notation and macro provenance; authorization alone is not a passed task.
  • Review the three remaining use-before-definition hints (two statistics, one number theory) against original context. Add source-first shape/unit tasks only when source supplies the needed facts.

Run the same source tasks after repairs and report per-field results. Keep generated reports under .artifacts; never change expectations to match output or replace author evidence with a synthetic-law benchmark. Obtain actual author feedback before claiming time savings.

Qualification

#407 candidate 727d9b1bcad89039966e566a4e76cdd91b41b8bf passed exact x86_64 Linux release:check (reproducible WASM, check, quality, 501-document performance, package, documentation) and GitHub CI. Both clean macOS and Linux original-source runs produced identical query results and diagnostics, including native/WASM parity. WASM SHA-256: 24648ba58d30bb7a3edd4ed817d861a59f92199ac7cd7a9c657ce468f552723b.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions