Skip to content

feat(backlog): DECOMPOSED - decompose B-0160 part 1 (from #4876)#4949

Closed
AceHack wants to merge 4 commits into
mainfrom
lior-decompose-4876-backlog
Closed

feat(backlog): DECOMPOSED - decompose B-0160 part 1 (from #4876)#4949
AceHack wants to merge 4 commits into
mainfrom
lior-decompose-4876-backlog

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 25, 2026

This PR is a decomposition of #4876, containing only the backlog decomposition.

Copilot AI review requested due to automatic review settings May 25, 2026 16:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/Core/Circuit.fs
Comment on lines 185 to 187
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines 14 to 16
<ItemGroup>
<ProjectReference Include="..\..\src\Core\Core.fsproj" />
<ProjectReference Include="..\..\src\Core.CSharp.ZetaId\Zeta.Core.CSharp.ZetaId.csproj" />
</ItemGroup>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 25, 2026

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.

@AceHack AceHack closed this May 25, 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