Repository navigation
Serve no knowledge tied to the evaluated problem families - #74
Merged
Merged
Conversation
An audit of the knowledge openPASO served during its evaluation found entries tied to the problem families it was evaluated on: a family's tensor, contrast or Poisson's ratio, values of a development solution, the leading terms of a development problem's source term, or the name of a development run. Each entry keeps its lesson and loses the family-specific part. - NGSolve: the pitfalls on a matrix CoefficientFunction and on specialcf.xref are re-measured on a tensor and a solution no family uses (K = [[5,2],[2,4]], u = sin(pi x) sin(pi y), maxh 1/4 to 1/32, NGSolve 6.2.2604); the xref finding of audit_results quotes the new measurement. - Weak-form check: its error message and argument examples use a neutral tensor and source term. - Coupling knowledge: the flux-recovery measurement no longer names the contrast and mesh it was measured at (both copies); the DUNE contract's config example and a development error size are neutral. - 4C: the HEX8 locking entry drops the measurement at NUE 0.4999 with KINEM linear. - FEBio: the body-force entry and the deck-grammar module no longer name development runs. - Input-language rule: neutral examples; the 4C parse error is quoted as measured on 4C 2026.2.0-dev for the new expression; the deck-lint docstring no longer quotes a development source term. - New guard: agent-reachable text carries no polynomial with numeric coefficients as an example, the shape of a development problem's source term. It fails on the previous text and passes now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new contamination guard misses powered polynomial examples when a preceding linear pair consumes an overlapping match.
1 open finding
What changed in this PR
Removes evaluation-family-specific details from served solver knowledge while preserving general guidance.
Changes:
- Replaces development-problem examples and measurements with neutral alternatives.
- Removes development-run identifiers and selected family-specific values.
- Adds a guard against polynomial source-term examples.
| File | Description |
|---|---|
| tests/test_knowledge_not_contaminated.py | Adds polynomial-example detection and planted checks. |
| src/tools/result_audit.py | Replaces development-specific xref measurements. |
| src/tools/knowledge.py | Uses a neutral expression-parser example. |
| src/tools/fourc_deck_lint.py | Generalizes a docstring’s source-term example. |
| src/tools/coupling_knowledge.py | Removes family-specific coupling examples and values. |
| src/tools/consolidated.py | Updates weak-form examples and flux guidance. |
| src/backends/ngsolve/generators/poisson.py | Replaces tensor and coordinate-pitfall measurements. |
| src/backends/fourc/generators/solid_mechanics.py | Removes a family-specific locking measurement. |
| src/backends/febio/deck_grammar.py | Removes a development-run identifier from documentation. |
| src/backends/febio/backend.py | Removes a development-run identifier from guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
finditer took non-overlapping pairs, so in 3*x + 2*y - 7*x**2*y the linear pair consumed the 2*y that starts the pair with the power, and the example passed. The guard now looks ahead at every monomial start; a planted case with a leading linear pair shows it. Co-Authored-By: Claude Opus 5.5 (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.

Why
An audit of the knowledge openPASO served during its evaluation found entries tied to the problem families it was evaluated on. Each carried one of these: a family's tensor, contrast or Poisson's ratio; values of a development solution; the leading terms of a development problem's source term; or the name of a development run. Each entry below keeps its lesson and loses the family-specific part.
What changes
CoefficientFunction,specialcf.xref)K = [[5,2],[2,4]],u = sin(pi x) sin(pi y),maxh1/4 to 1/32, NGSolve 6.2.2604 (below)audit_results, the xref finding[[5,2],[2,4]];2*pi**2*sin(pi*x)*sin(pi*y)The two scikit-fem templates the audit also listed (biharmonic with Morley elements, Stokes with Taylor–Hood elements) are generic templates of their method and stay.
Measurements behind the new text
NGSolve 6.2.2604, H1 order 1, unit square,
maxh= 1/4, 1/8, 1/16, 1/32:sin(pi x) sin(pi y)atmaxh= 1/32CoefficientFunction((5,2,2,4), dims=(2,2))CoefficientFunction([[5,2],[2,4]])specialcf.xrefThe nested-list spelling assembles the same stiffness matrix, bit for bit, as
CoefficientFunction(5.0). Its field differs from that solve by at most 2.3e-15.4C 2026.2.0-dev,
SYMBOLIC_FUNCTION_OF_SPACE_TIME: "2*pi**2*sin(pi*x)*sin(pi*y)"stops withError while parsing: ... Expected a primary expression.; the same expression with^runs toprocessor 0 finished normally.New guard
test_no_polynomial_source_term_as_an_example: agent-reachable text carries no polynomial with numeric coefficients as an example, the shape of a development problem's source term. On the currentmainit fails on exactly the three examples above; on this branch it passes. A planted test shows that it can fail.Tests
.venv: 101 passed, 13 skipped (tests/withouttest_web_search_reports_a_block.py; the skips are a missing 4C source tree, dolfinx not importable, and backends without reference-only areas)..venv-lg: 11 passed (test_web_search_reports_a_block.py).🤖 Generated with Claude Code