feat(backlog): DECOMPOSED - decompose B-0160 part 1 (from #4876)#4949
feat(backlog): DECOMPOSED - decompose B-0160 part 1 (from #4876)#4949AceHack wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45b4738165
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if k <> n then | ||
| invalidOp "Circuit has a cycle that does not pass through a strict operator" | ||
| // Sink-terminality enforcement. The `ISinkOperator` docstring | ||
| // (PluginApi.fs) promises *"the scheduler enforces terminal | ||
| // placement (a sink may not feed another operator inside a | ||
| // relational path)"*. PR 2 makes that promise load-bearing: | ||
| // any operator whose `Inputs` contains a sink is rejected | ||
| // with a diagnostic naming both endpoints, the sink's | ||
| // position in the DAG, and a pointer to the algebra-tag | ||
| // contract. Sinks are retraction-lossy by design (e.g. | ||
| // BayesianRateOp aggregates state that doesn't un-accumulate); | ||
| // letting a downstream operator read from a sink would | ||
| // violate the relational composition laws Z-set algebra | ||
| // depends on. | ||
| // | ||
| // Defensive ordering: this runs AFTER the topo-sort succeeds | ||
| // so the error message can reference op IDs that are stable. | ||
| // O(N + E) — each edge checked exactly once. | ||
| for op in ops do | ||
| for dep in op.Inputs do | ||
| if dep.IsSink then | ||
| invalidOp | ||
| (sprintf | ||
| "Sink-terminality violation: operator '%s' (id=%d) reads from \ | ||
| sink operator '%s' (id=%d). Sinks are terminal — they may not \ | ||
| feed other operators in a relational path because sink state is \ | ||
| retraction-lossy and breaks Z-set composition laws. See \ | ||
| PluginApi.fs:ISinkOperator for the contract." | ||
| op.Name op.Id dep.Name dep.Id) | ||
| schedule <- order |
There was a problem hiding this comment.
Reinstate sink terminality validation in Circuit.Build
After topological sorting, Build() now assigns schedule without checking whether any operator consumes a sink output. That silently permits ISinkOperator nodes to feed downstream relational operators, even though src/Core/PluginApi.fs still defines sinks as terminal. In pipelines that include retraction-lossy sinks (for example Bayesian sink-style operators), this turns what should be a fail-fast build error into wrong incremental results at runtime.
Useful? React with 👍 / 👎.
| <ItemGroup> | ||
| <ProjectReference Include="..\..\src\Core\Core.fsproj" /> | ||
| <ProjectReference Include="..\..\src\Core.CSharp.ZetaId\Zeta.Core.CSharp.ZetaId.csproj" /> | ||
| </ItemGroup> |
There was a problem hiding this comment.
Restore missing ZetaId test dependencies
This project now references only Core.fsproj, but the default compile set still includes tests/Tests.CSharp/ZetaId/*.cs files that import Zeta.Core.CSharp.ZetaId and YamlDotNet. Removing those references makes the C# test project uncompilable in a normal .NET environment, so the test gate breaks before tests can run.
Useful? React with 👍 / 👎.
|
The CodeQL check is failing for a Go analysis on a PR with no Go files. This appears to be a false positive. Please investigate the CodeQL workflow. |
This PR is a decomposition of #4876, containing only the backlog decomposition.