Skip to content

feat(circuit): certify native generation of balanced circuit trees #543

Closed

Description

@SamuelSchlesinger

Part of shallow GSW decryption (#528) and the FHE recovery (#486). The existing Circuit.balanced preserves a precise half-split tree. Its semantic/depth results do not yet supply a uniform native generator of the complete serialized circuit. Reuse the circuit-code primitives in #531 / PR #534 and the full-code size bound from #526 / PR #542; the carry-save generators in #540 are the intended client.

Scope and completion criteria:

  • Generate exactly (Circuit.balanced op unit cs).code, including the existing half-split topology. For five leaves this is (ab)(c(de)); an adjacent-pair round algorithm has a different tree, which matters for carry-save pairs.
  • Require uniform native generation of op/unit and the complete leaf-code list (or a jointly native input/index generator with an efficient count). Input/output arities and list lengths may vary. No per-parameter finite-type shortcut or assumed construction-runtime bound.
  • A private dynamic program over contiguous sublists in increasing length is an accepted implementation direction: prove agreement with the existing balanced fold, then the typed circuit. Keep the public interface small; do not introduce an unused generic recursion framework.
  • Bound the complete encoded intermediate state, including all interval rows, framing, indices, current accumulator and captured codes. Derive bounds from the input generators and existing full-code size bounds. Circuit gate counts admit the bound unit.size + sum leaf.size + k*op.size.
  • Exercise empty/nontrivial-unit, singleton/unused expensive op, three/five leaves, unequal/repeated leaf blocks, varying arities and zero-output circuits with dead gates. Include an unbounded-width native client, exact raw-code equality and axiom guards.
  • Run all six repository checks and obtain independent API/correctness review of the final revision. Assess the formal abstract catalogue; record the remaining full feat(crypto): construct shallow GSW decryption circuits #528 circuit work accurately.

A read-only independent design review found the private interval-table approach viable; it is not an implementation proof. No duplicate native balanced-fold task was found. AI-assisted task decomposition (OpenAI Codex).

Activity

  1. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Active — worker-codex-balanced-code-20261023 (worker). I claim the full #543 scope: exact existing half-split topology, native full-code generation with derived intermediate-state bounds, varying arities, and carry-save regression clients. I will use isolated branch feat/balanced-code-20261023, based on #540’s independently reviewed tree 309031ee6bf479d96cc8f29f9994daab0de7b236, with private mutable build outputs. I am checking the existing balanced-fold and code APIs before implementation; independent review will precede publication.

  2. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    available — worker-codex-balanced-code-20261023 is stopping at the requested wrap-up. The exact half-split generator, its uniform native certificate with a derived whole-table bound, topology/dead-gate/growing-CSA tests and roadmap note are complete locally. All six scripts/check.sh gates and git diff --check passed. Independent review has been requested; no approval is claimed here.

    Resumable checkpoint: branch feat/balanced-code-20261023 in /private/tmp/complexitylib-balanced-code-20261023; code commit 9c3d220b8fdd058c3a573baf531852f8ee1ba242, local head ee5a55042129d737505635f63ffddabf898efb1d, tree 711fccb0f8b3a933bac52772100805f0c4b1025d. Its parent has the identical source tree to #544 head 11c1e53. The five-file manifest, patch, Git bundle and publication payload are preserved under /private/tmp/complexitylib-balanced-code-*; the coordinator has their exact paths and hashes.

    Publication remains blocked: automatic approval review rejected the first GitHub blob upload because it did not find authorization for the exact payload/destination. No upload succeeded, and no alternate route was attempted. Remaining work is authorization resolution, canonical publication/draft PR, and independent exact-revision review. No unattended work or updates are promised; #543 stays open. Selected abstract catalogue statements are unchanged.

  3. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Final delegated checkpoint update from worker-codex-gsw-shallow-decryption-20261023: state available under the human-requested pause. Independent nonauthor /root/refactor_plan_review approved exact local head ee5a55042129d737505635f63ffddabf898efb1d, tree 711fccb0f8b3a933bac52772100805f0c4b1025d, five-file manifest 59920c648631a49ccc827b5d10fd16464adba7f2d7de3af8c5137d1afdea7e14, without findings. Review covers exact half-split topology, uniform full-code generation, complete intermediate-state bounds, nonvacuous regressions, API and docs; all six author-run gates passed. Source, patch, Git bundle and payload remain in the worker's recorded local checkpoint. Publication and remote revision binding remain pending: automatic approval review rejected the first GitHub source-blob upload for insufficient established authorization/repository trust. No upload succeeded and no alternate route was attempted. The worker stopped its five verified Lean/Lake processes; no unattended work is promised. Keep this issue open until publication/integration is dispositioned.

  4. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Active — codex-worker-balanced-01a16ab8, delegated by coordinator-codex-01a16ab8, taking the explicitly released full #543 scope. New isolated branch feat/balanced-code-543 on landed main; coordinating the exact half-split/native full-code interface with the #528 worker. The old /private/tmp checkpoint is unavailable on this machine and its recorded commits are absent from this object database; I have not recovered or reused that unpublished implementation. Its author/reviewer credit remains in the prior handoff. Acceptance remains the existing topology, uniform native generator, derived entire-state bounds, meaningful varying-size/boundary/dead-gate clients, six gates and independent review. No broader FHE completion is implied.

  5. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Awaiting review — codex-worker-balanced-01a16ab8 submitted the full exact half-split/native-generation milestone as PR #594 at 07e13cd. All six default gates, hygiene and unchanged-catalogue validation pass; concrete growing carry-save and boundary/topology/dead-gate clients are checked. The PR owns validation details and preserved prior-checkpoint credit. Independent cross-fleet review is requested; no approval or merge by the author. #528/#486 remain open.

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

Metadata

Metadata

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