Skip to content

senline-service-dogfood: merge main and reopen dogfood PR - #53

Open
Hyper66666 wants to merge 53 commits into
mainfrom
codex/senline-service-dogfood-rebase
Open

senline-service-dogfood: merge main and reopen dogfood PR#53
Hyper66666 wants to merge 53 commits into
mainfrom
codex/senline-service-dogfood-rebase

Conversation

@Hyper66666

@Hyper66666 Hyper66666 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Merge of codex/senline-service-dogfood onto current main (includes HTTP TLS PR #51) on branch codex/senline-service-dogfood-rebase.

Do not reopen PR #44 (was CONFLICTING). This is the fresh PR.

Conflict resolution strategy

  • Prefer main production HTTP/TLS serving paths where net/http overlapped
  • Keep dogfood products, evidence, CI jobs (binary-io, worker differential, installed packages)
  • Keep dogfood http_request_owned_string_from_buffer leak-safe helpers
  • Keep dogfood JSON generation-slot handles (installed runtime payload)
  • Combine borrow: main prepare_remaining_uses + dogfood merge_moves
  • Fix if/else exclusive move analysis so dual-arm ownership transfer compiles

Post-merge fixes

  • write_http_response(..., keep_alive) arity on abandoned-request release
  • realworld e2e: dynamic fixture discovery + source-development runtime-mode + run
  • distribution upgrade smoke: main secondary-hash + -NoBuild path
  • if/else borrow isolation (CI worker differential use-after-move)

Verification (local Windows)

Check Result
cargo check -p sengoo-runtime --features native-bridge pass
cargo check -p sgc pass
cargo clippy -p sengoo-runtime --features native-bridge -- -D warnings pass
cargo clippy -p sgc -- -D warnings pass
cargo test -p sengoo-runtime --lib --features native-bridge net 45 passed
cargo test -p sengoo-compiler --lib borrow 24 passed
cargo test -p sgc --test senline_worker_differential identical_inputs pass
worker sgc build under module map pass

Full suite / dual-host installed pin identity not claimed green here.

Honest residuals (OpenSpec senline-service-dogfood)

  • 6.5 / 6.6 reopened: product matrix incomplete; client-surface policy soft-skip
  • 7.2 / 7.4 / 7.5 / 7.7 pin chain: red-first history + Senline pin outside this repo
  • 8.3 process_count sampler methodology still incomplete
  • 8.7 HTTP dual-package bit-identity still open (worker dual-package ok on prior runs)
  • 9.1 task text still mentions clippy min_max; local sgc/runtime clippy -D warnings now pass — leave task open until CI static gates confirm workspace-wide
  • 9.2 dual-host installed red residual until 8.7
  • 9.5 Senline pin blocked (external)

CI expectations

Expect some installed-package jobs may still go red on HTTP package hash mismatch (8.7). Worker differential should be green after the if/else borrow fix.

Freeze the linked Senline dogfood authority boundary, V1 fixtures,
promotion gates, and task list so Sengoo implementation work has a
strict, reviewable consumer contract independent of the mutable primary
checkout.

Constraint: This change only writes under the registered worktree and
cannot claim installed-bundle or Senline-pin evidence yet

Rejected: Implement worker packages before freezing the OpenSpec contract | that would let product code drift ahead of the reviewed authority matrix

Confidence: high

Scope-risk: narrow

Directive: Keep tasks 4.8, 5.9, and 6.5 unchecked until dual-host CI evidence exists

Tested: openspec validate senline-service-dogfood --strict (prior handoff green); git diff --check

Not-tested: Windows/Linux installed archive and Senline pin advancement
Senline's length-prefixed worker needs bounds-checked byte access,
host-independent big-endian u32, exact partial reads/writes, positive
generation handles, and Windows binary-mode stdin/stdout before any
protocol byte is exchanged.

Constraint: Text-style std::io line helpers remain compatibility surfaces and must not become the protocol path

Rejected: Rely on newline-delimited JSON over text pipes | binary length prefixes and control bytes are corrupted by Windows text mode

Confidence: high

Scope-risk: moderate

Directive: Keep exact-read/write loops free of implicit retry and never report a short write as success (SGDOG-2026-001/006/008)

Tested: prior handoff native buffer/binary/handle regressions green on Windows; formal 2.10 dual-platform gate still open

Not-tested: complete POSIX pipe matrix and installed-toolchain binary-I/O slice acceptance (task 2.10)
Worker plan encoding moves one request field on the unsupported path
and borrows nested owned strings on the supported path. Unreachable
move state no longer poisons fallthrough, and temporary SSA values are
spilled before taking addresses for length-aware builders.

Constraint: This is a bounded reachability/codegen fix, not a full control-flow lattice or nested mutable place model

Rejected: Keep temporary handle-rewrapping workarounds in product packages | that hides invalid LLVM and reintroduces consumer boilerplate (SGDOG-2026-011/012)

Confidence: high

Scope-risk: moderate

Directive: Preserve instruction_source and stack-local AddrOf paths; only spill when the source is not already addressable

Tested: prior handoff compiler lib, borrow, ownership, struct codegen, and Clippy green on Windows

Not-tested: full nested mutable reference semantics and legacy JIT emitter parity
Installed sgc must resolve per-target runtime libraries from a hashed
manifest without falling back to a mutable source checkout or implicit
Cargo rebuild. Packaging, installers, and distribution tests now treat
the native runtime as a release payload with explicit source-development
escape hatch only.

Constraint: Cargo runtime construction remains eligible only behind --runtime-mode source-development and is never pin evidence

Rejected: Let Senline build workers from D:\Sengoo | that path is mutable, non-portable, and hides missing installed layout (SGDOG-2026-004)

Confidence: high

Scope-risk: moderate

Directive: Fail closed on missing, tampered, wrong-target, or incomplete installed runtimes before link

Tested: prior handoff runtime_distribution suite (15 passed) and local Windows archive smoke; clean dual rebuild comparison still open

Not-tested: clean Windows/Linux independent A/B archive hashes (tasks 4.7-4.9)
Locked package loops must carry an explicit runtime-mode into every
delegated sgc invocation and expose the selected package's reachable
library module map so consumers can import senline_domain_worker without
redeclaring its internal graph.

Constraint: Conflicting transitive aliases still fail closed; the flat module map is not a full multi-version graph

Rejected: Force every product package to re-list worker-internal path deps | that couples consumers to implementation layout (SGDOG-2026-005/014)

Confidence: high

Scope-risk: moderate

Directive: Encode reachable dependency aliases in deterministic order when constructing SENGOO_MODULE_MAP

Tested: prior handoff sgpm transitive integration 2/2 and realworld locked loop green on Windows

Not-tested: full installed-toolchain package loops on Linux
Ready next_request_async futures must release unpublished request
handles on drop/cancel, and owned request-string/body copies must commit
Buffer used_len so strict JSON and length-aware String construction stay
valid on Windows.

Constraint: This does not claim general task cancellation or production HTTP ingress readiness

Rejected: Leave cleanup to product packages | leaked connections and zero used_len caused 504 hangs and 0xC0000005 (SGDOG-2026-013/015)

Confidence: high

Scope-risk: moderate

Directive: Commit exact copied length through a checked runtime primitive before constructing owned strings

Tested: prior handoff focused HTTP drop regressions, net suite 40/40, http_request_strings 1/1 on Windows

Not-tested: complete Windows/Linux localhost matrix (task 6.5)
Introduce locked sgframing, sgjson_contract, senline_facts_to_plan, and
senline-domain-worker packages that implement the frozen V1 handshake,
strict codec, pure planner, and protocol-only stdout framing against
reviewed fixtures.

Constraint: Source-development package loops are not installed-toolchain pin evidence

Rejected: Embed cryptography or transaction authority in the planner | Rust remains the reference monitor for every mutation

Confidence: high

Scope-risk: moderate

Directive: Keep planner free of network, filesystem, clock, randomness, and retained request state

Tested: prior handoff locked package tests, differential 5.11 sharded corpus green on Windows

Not-tested: installed Windows/Linux package loops (tasks 4A.4, 5.12-5.13) and Linux determinism digest (task 5.9)
Exercise the shared facts-to-plan module over ephemeral 127.0.0.1:0 with
synthetic fixtures only, returning the same normalized plan/error contract
as the framed worker without claiming ingress or TLS authority.

Constraint: Serial plaintext Connection: close and single-request limits remain documented unsupported production paths

Rejected: Advertise the harness as internal-alpha ingress | it fails keep-alive, concurrency, and TLS gates by design

Confidence: high

Scope-risk: narrow

Directive: Reject non-loopback binds and never wire Senline clients or deployment manifests to this package

Tested: prior handoff HTTP locked loop 17 items and local worker/HTTP 647-byte equivalence on Windows

Not-tested: full dual-host localhost matrix and anti-deployment checks (tasks 6.5-6.7)
Encode the frozen V1 fixtures, independent Rust oracle, sharded 100k
differential corpus, fault isolation probes, defect-evidence schema
checks, and source-development runtime-mode plumbing required by
existing sgc integration tests.

Constraint: Sharded 100k success is not single-worker soak evidence; case 44086 timeout remains open for task 8.3

Rejected: Treat ignored release corpora as default CI green without explicit --ignored invocation and dual-host digests

Confidence: high

Scope-risk: moderate

Directive: Keep release differential tests ignored by default and record transcript digests for cross-host comparison

Tested: prior handoff 5.11 sharded corpus and contract fixture suites on Windows

Not-tested: Linux determinism digest (5.9), one-million soak (8.3), and full fault matrix CI
Record SGDOG-001 through SGDOG-015 with RED/GREEN local evidence, the
8.3 single-worker resource observation, support-authority boundaries,
library incubation policy, and the Lore commit plan for the dirty
working tree that is now staged into reviewable commits.

Constraint: No defect is pinned or closed; release_eligible remains false until clean dual-host artifacts exist

Rejected: Claim Senline pin readiness from dirty or source-development manifests | pin requires independent complete bundle verification

Confidence: high

Scope-risk: narrow

Directive: Keep task 8.3 open for case 44086 single-worker degradation; never treat sharded 5.11 as soak green

Tested: openspec validate and git diff --check green on prior handoff; docs-only commit

Not-tested: automated evidence schema validation against post-commit SHAs for every SGDOG record
Nullable runner metadata fields became null after ConvertTo-Json and
broke SHA comparison with a method call on null. Canonical-Json now
emits a stable null token so allowed excluded-field differences can be
reported without aborting.

Constraint: This only hardens the comparator; dual independent rebuild evidence still requires CI A/B on each host

Rejected: Force every excluded field to a non-null string | that would invent provenance

Confidence: high

Scope-risk: narrow

Directive: Keep generated_at_utc and runner metadata out of the normalized payload hash

Tested: compare-distribution-manifests.ps1 on two NoBuild Windows packages -> status=reproducible, only generated_at_utc excluded difference

Not-tested: Ubuntu dual-build comparison and release_eligible=true archives
Capture the clean revision stack, PR/CI links, local Windows package and
installed-worker evidence, and the remaining dual-host gates that still
block tasks 2.10, 4.7-4.9, 5.9, and 6.5.

Constraint: Documentation only; no OpenSpec task boxes are closed in this commit

Rejected: Check dual-host tasks from Windows-only smokes | Ubuntu CI and Linux digests remain required

Confidence: high

Scope-risk: narrow

Directive: Keep task 8.3 open for the single-worker case 44086 degradation

Tested: docs-only; prior Windows package/install/worker evidence recorded in the plan

Not-tested: completion of GitHub run 29391088380 at time of commit
Installed-runtime fail-closed policy rejects implicit Cargo runtime
construction from a source checkout. The pre-package release smoke still
runs against target/release sgc, so it must pass --runtime-mode
source-development. Packaged install smokes keep default installed mode.

Constraint: Source-development remains non-release and is not Senline pin evidence

Rejected: Re-open implicit Cargo fallback for bare sgc run | that would hide missing installed runtime packages

Confidence: high

Scope-risk: narrow

Directive: Keep post-install stdlib/run smokes on installed mode only

Tested: target/release/sgc --runtime-mode source-development run examples/01_hello.sg --force-rebuild (exit 42)

Not-tested: full toolchain-distribution matrix on GitHub runners after this push
CI package smoke failed after the source-development hello fix: PowerShell
collapsed single-element link_args and null dynamic_dependencies, revived
generated_at_utc as DateTime on some hosts, and installed sgc requested
*-apple-macosx while packages ship *-apple-darwin.

Force contract-critical arrays when writing manifests, coerce JSON scalar
and DateTime shapes in the comparator, emit host triples as apple-darwin,
and accept apple-macosx as an installed-runtime alias.

Constraint: Source-development remains non-release and is not pin evidence

Rejected: Keep host triples on apple-macosx and only rewrite CI | that would leave real installed macOS users failing target checks

Confidence: high

Scope-risk: moderate

Directive: Keep packaging and installers on apple-darwin as the distribution identity

Tested: package-toolchain NoBuild A/B + compare reproducible; cargo test -p sgc --bin sgc cross_compile_host_triple (2); native_link_adds_macos (1); release sgc version matches HEAD

Not-tested: full GitHub toolchain-distribution matrix after this push
Independent Windows package A/B failed on payload hashes because cargo
only remapped the target directory and MSVC PE/COFF objects still carried
timestamps. Packaging now owns CARGO_ENCODED_RUSTFLAGS: remap both the
source checkout and cargo target, disable debuginfo, and pass /Brepro,
/INCREMENTAL:NO, and /DEBUG:NONE on Windows hosts.

Constraint: Determinism applies to package-toolchain builds; ad-hoc developer cargo builds remain free

Rejected: Mark Windows as non-reproducible in CI | Ubuntu already proves dual-build payload identity is required for pin evidence

Confidence: high

Scope-risk: moderate

Directive: Keep package-toolchain as the single owner of distribution RUSTFLAGS so workflow and local packaging stay aligned

Tested: two independent cargo target dirs with the new flags produced identical release/sgc.exe and staticlib/sengoo_runtime.lib SHA-256 on Windows

Not-tested: full four-host toolchain-distribution matrix after this push
Mark OpenSpec tasks 4.7, 4.8, and 4.9 complete against GitHub Actions run
29419695542 on ba0d03a, where Windows and Linux dual-build package
smokes and the four-host distribution matrix passed. Update support and
commit-plan records without claiming installed worker/HTTP pin readiness.

Constraint: Senline pin and product package installed loops remain open

Rejected: Check 2.10, 5.9, or 6.5 from packaging smoke alone | those require binary-I/O dual-platform, worker determinism, and HTTP matrices

Confidence: high

Scope-risk: narrow

Directive: Keep task 8.3 open for single-worker case 44086 resource investigation

Tested: docs/OpenSpec evidence update only; underlying CI success already recorded

Not-tested: installed senline-domain-worker/HTTP loops on the CI archives
Add plan-binding and HTTP anti-ingress policy tests, enable
workflow_dispatch on core-conformance, package workers from an installed
toolchain via scripts/package-senline-worker.ps1, and record evidence for
completed OpenSpec tasks. Leave dual-host determinism, Linux installed
worker loops, 1M soak, and Senline pin advancement open.

Constraint: Task 8.3 single-worker soak and 7.5 Senline pin remain out of scope until evidence exists

Rejected: Mark 5.9/5.12/6.5 complete from Windows-only loops | dual-host transcripts are still required

Confidence: high

Scope-risk: moderate

Directive: Keep case 44086 resource investigation on the 8.3 path

Tested: cargo fmt --check; cargo clippy -p sgc --tests -D warnings; senline_plan_binding 2/2; senline_http_policy 3/3; senline_worker_faults 6/6; realworld senline_worker 9/9; determinism 1/1; installed worker/HTTP locked loops; package-senline-worker.ps1

Not-tested: Linux installed worker package loop and dual-host differential digest equality after this push
Native Buffer/I/O probes compile runtime.c with -std=c11, which hid glibc
lstat without feature-test macros. Define _DEFAULT_SOURCE/_XOPEN_SOURCE on
non-Windows before headers. Force LF for JSON/raw fixtures in gitattributes
and normalize CR out of fixture bytes before frozen SHA-256 and handshake
equality checks so Windows checkouts stay deterministic.

Constraint: Senline pin advancement remains blocked outside this worktree

Rejected: Skip Linux native probes in CI | that would hide real installed-toolchain compile failures

Confidence: high

Scope-risk: narrow

Directive: Keep fixture digests LF-canonical across hosts

Tested: cargo test -p sgc --test senline_worker_differential (2 passed, 2 ignored)

Not-tested: full core-conformance re-run after this push
Update consumer_record_sha256 after defects ledger edits so core-language
evidence validation passes. Add the handoff document for remaining open gates.
Use the Git blob SHA for senline-dogfood-defects.md and strip CR before
hashing consumer/fixture bytes so Windows checkouts match Linux CI.
Close task 5.9 with matching Windows/Linux differential digests, publish
resource/latency methodology, add worker/HTTP package dual-build compare
scripts, and advance handoff/tasks for remaining open gates only.
Distribution dual-host package smoke is an intermediate installed claim and
must not be forced back to pending, while full product-loop proven stays forbidden.
Point the reproducibility workflow test at package-toolchain path remaps,
add dual-host installed worker/HTTP package packaging CI, and fix worker
package paths for non-Windows hosts.
Enable dual-host installed-toolchain worker and HTTP packaging evidence on
workflow_dispatch without requiring a new default-branch workflow file.
Installed sgpm must not fall back to source-development when packaging from
inside the Sengoo checkout on dual-host CI.
Use PathSeparator and pin SGPM_SGC/SGPM_SGFMT so Linux CI cannot fall back
to checkout target/release/sgc during installed package loops.
PowerShell variable names are case-insensitive, so $isWindows overwrote the
read-only automatic $IsWindows during installed package loops.
Close tasks 5.12, 6.5, 8.7, and 9.2 against core-conformance run 29430796769
and keep 8.3/8.4/7.5/9.5 open with explicit remaining limits.
Preserve remaining pin/soak limits while reflecting dual-host installed
worker/HTTP product-loop CI evidence from run 29430796769.
Check in senline_worker_resource harness with memory/latency sampling and
document Windows investigate-45k degradation (case 29014 / 900s) without
claiming task 8.3 soak green.
Update consumer_record_sha256 after documenting the Windows investigate-45k
resource observation in the defect ledger.
By-value String parameters to lowered lambdas never ran Drop glue, so
sgjson field-allowlist callbacks leaked a key string per field per request.
Force-record owned lambda param drops, add a regression, and tighten the
45k resource investigation gate after verifying ~92 B/case growth.
Keep consumer_record_sha256 aligned with the updated resource observation
section in senline-dogfood-defects.md.
By-value String params skip auto-Drop for legacy handles, so
worker_validate_execution_mode consumed one mode string per request.
Validate via &str, reuse the single extract, and record investigate-45k
evidence (~3.4 B/case, flat PWS).
- Reopen 5.12/5.13, 6.5/6.6, 7.2-7.4/7.7, 8.2/8.7, 9.1-9.3 with honest evidence notes
- Fix unsupported-version request String leak via owning reject/accept helpers
- Kill resource worker before joining stdout/stderr so soak watchdogs cannot hang
- Regenerate build identity during packaging and enrich worker-manifest metadata
- Add unsupported-opver memory regression; document why bare String param Drop is unsafe
Add process-contained worker kill/panic/broken-pipe/stdout contamination/
stderr flood/handshake-mismatch tests (task 8.2). Installed dual-host job
now clears build caches between package A/B, compares without executable
hash drift, and runs real framed worker parent/child plus localhost HTTP
product probes against packaged binaries.
Record Windows 1M single-worker soak (~0.07 B/case growth), fix dual-package
compare for equal-size executable hash divergence, wire resource smoke on
dual-host differential CI, enrich HTTP package manifests, and mark Sengoo-
owned OpenSpec tasks complete with evidence. Leave 7.5/9.5 blocked on Senline
pin write scope.
Populate red_status=preserved with red_commit and fixing_commit for
SGDOG-001/014/015 so 7.2-7.4 claims match the durable evidence ledger.
Update defect evidence tests accordingly; pin/consumer gates stay pending.
…rclaims

Address REQUEST CHANGES on inflated 81/83 completion without re-checking
tasks that still lack dual-host or red-first evidence.

- Compare: executable hash mismatch fails closed by default (8.7)
- Resource sampler v2: private_bytes, OLS slope, 10k window, handle plateau, JSONL
- Package: LICENSE.txt + sbom-inputs payloads; split build_tools vs runtime deps
- CI: fmt/doc installed loops, malformed HTTP probe, ExitCode, upload pin trees
- Evidence: reset fabricated red/fix commits to pending-commit
- Tasks/handoff: reopen 5.12/5.13/6.5/6.6/7.2/7.4/7.7/8.3/8.7/9.1-9.3 honestly
- Clippy: upper_case_acronyms allow on Win32 FFI; len_zero -> is_empty
…ol HTTP

- Compare requires and diffs runtime_dependencies/build_tools/license/provenance
- Negative tests for dep identity, license, and exe hash fail-closed
- Resource sampler oracle-matches plan decision/reason; empty JSON fails
- No gate skip on missing samples; cases_completed vs requested; process poll
- CI malformed probe expects HTTP 200 + malformed_json envelope (not 400)
- Worker lib.sg formatted; HTTP/worker package dep classification corrected
- Task 7.3 evidence text no longer claims filled fixing_commit SHAs
- sgc: sort object paths; /Brepro and --build-id=none under deterministic link
- Package scripts set SENGOO_DETERMINISTIC_LINK=1 and normalize PE/ELF identity
- CI: worker/HTTP plan byte equality + GET method transport 400 probe
- Addresses dual-build executable_hash_mismatch red on run 29591323656
- Keep static archives after sorted objects (restores sengoo_net_last_error link)
- Deeper package build-cache clean between dual packages; product probes run
  even when pin-grade compare fails so functional evidence still lands
- ELF strip in pin normalize; record 8.3 1M schema-v2 soak evidence
Force frontend-jobs=1 when SENGOO_DETERMINISTIC_LINK is set so large HTTP
package dual builds no longer emit non-identical IR/object order. Also
disable incremental link during package builds.
- Check 5.12/5.13/6.5/6.6/8.3/9.1-9.3 with dual-host run 29595215669 + 1M soak
- Keep 7.2/7.4/7.7 open (no fake red-first); 7.5/9.5 blocked; 8.7 open for HTTP dual hash
- Handoff records true open set and worker bit-identical vs HTTP fail-closed gap
…ount

- Reopen 6.5/6.6/8.3/9.1/9.2 (and partial 9.3) with honest review notes
- Fix clippy::min_max in frontend_helpers (9.1 gate)
- sgfmt: extract/reinject line+block comments; RED tests; restore worker Drop notes
- 6.6: scan kt/cs/xaml/ts/gradle/xml; synthetic client fixtures; tighter markers
- 8.3: measure worker process tree (not hardcode 1); publish summary SHA evidence doc
- Pin normalize: record tool path/version/exit; deterministic link opt-in only
Resolve conflicts by combining main production-serving/HTTP/TLS progress
with senline dogfood CI jobs and tests. Prefer senline owned HTTP request
string helpers and keep prepare_remaining_uses + merge_moves borrow check.
…rade path.

- Pass keep_alive=false to write_http_response in abandoned-request release path
- Collapse realworld fixture loop; keep source-development runtime-mode + run
- Prefer main secondary-hash + NoBuild upgrade package in distribution workflow
Borrow check was merging then-branch moves into the parent before checking
else, so exclusive request ownership transfers in both arms (worker
dispatch) false-failed as use-after-move. Analyze else from the pre-if
moved set, then union fall-through moves for subsequent code.

Tested: worker differential identical_inputs; sengoo-compiler borrow lib tests.
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.

1 participant