Skip to content

Accept materialized posets for linear-extension counts - #787

Closed
yuelgrace1810-ops wants to merge 4 commits into
mainfrom
agent/linear-extension-artifact-input
Closed

Accept materialized posets for linear-extension counts#787
yuelgrace1810-ops wants to merge 4 commits into
mainfrom
agent/linear-extension-artifact-input

Conversation

@yuelgrace1810-ops

@yuelgrace1810-ops yuelgrace1810-ops commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • let LinearExtensionRequest accept exactly one of an inline canonical poset or a materialized-poset artifact URI;
  • connect poset.finite.materialize to poset.linear_extensions.count through the repository's existing typed artifact converter boundary;
  • preserve the 20-element subset-DP bound after artifact conversion;
  • advertise producer/consumer artifact compatibility in discovery metadata;
  • preserve independent checker replay for legacy inline requests whose model dump now includes a null artifact field;
  • add a composition regression proving direct artifact consumption, lineage preservation, and the exact count.

Root cause and evaluation evidence

The harder 24-run routing study found that the agent discovered poset.linear_extensions.count, but the operation could not consume the artifact produced by poset.finite.materialize. It attempted to reconstruct the opaque canonical poset manually and failed on element ordering, transitive reduction, ranks, and digest binding: 13 MCP calls, eight errors, 304,743 input tokens, and no completed expected capability.

With the exact contract-inspection Skill fix alone, the run improved to seven calls but still failed. With this artifact-composition fix plus that guidance, the same task completed successfully in six calls and 59.8 seconds, using the materialized result URI rather than reconstructing canonical internals.

Overlap

Merged PR #619 established this typed materialization path for poset.width.compute, but poset.linear_extensions.count was not connected. This PR reuses that infrastructure and does not introduce a new artifact system.

Safety

Artifact retrieval, schema identity, semantics identity, and conversion remain owned by MaterializedOperationAdapter. Inline requests remain supported. The checker accepts only an inline poset with a null artifact URI and still rejects artifact-only claims it cannot independently resolve. No mathematical algorithm, count, assurance level, or checker authority changes.

Validation

  • focused poset capability suite: 21 passed
  • focused independent poset checker suite: 12 passed
  • mypy on changed source modules: passed
  • Ruff lint and format checks passed
  • git diff --check passed
  • focused real-model forward test: contract satisfied

@morluto
morluto marked this pull request as ready for review August 8, 2026 17:34
@morluto

morluto commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Closing as superseded by #884 / commit bb6adc8. Current main deliberately replaced poset.finite.materialize artifact handoff with poset.finite.compute and direct typed-value composition. Rebasing this branch would restore the removed materializer and conflict with the current rule that ordinary mathematical values should remain inline for operation-to-operation handoff.

@morluto morluto closed this Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants