Skip to content

ci(release): publish an engine release from a manual workflow run - #42

Merged
New1Direction merged 7 commits into
mainfrom
claude/stoic-lamport-3t9dyl
Oct 28, 2026
Merged

New1Direction merged 7 commits into
mainfrom
claude/stoic-lamport-3t9dyl

Conversation

@New1Direction

Copy link
Copy Markdown
Owner

Why

This session can't push tags, so engine-v0.1.0 couldn't be published by pushing a tag. With this change, a manual run of Engine binaries with version: engine-v0.1.0 publishes exactly what a tag push would:

  • builds the four targets,
  • runs the parity suites on each native build,
  • publishes the archives, SHA256SUMS and the provenance attestation.

gh release create --target "$GITHUB_SHA" creates the tag on the commit it built.

Changes

  • release-engine.yml:
    • adds a workflow_dispatch input version (empty means build only);
    • publish runs for a tag push or a manual run with a version;
    • the version reaches the shell through an environment variable (never interpolated into the script) and must match engine-vX.Y.Z.
  • docs/rust-engine.md: documents the manual release.

The branch also carries a no-op merge of its earlier history (already squash-merged in #41), so the push could fast-forward. It changes no files.


Generated by Claude Code

Port discover_repo.py to Rust with output that matches byte for byte:
the same walk order and budgets, ID quoting, gap ordering, and Python's
json.dumps formatting. The YAML loader is a port of PyYAML's reader,
scanner, and parser plus the SafeLoader resolver, so it accepts and
rejects exactly what PyYAML does (tabs, NEL line breaks, YAML 1.1
scalars such as 1:30).

- discover_repo.py: refuse explicit YAML tags; bound YAML nesting (64)
  and JSON nesting (512) explicitly instead of at Python's recursion
  limit; a TOML float that overflows is an error, not infinity; parse
  failures report a stable category (YAMLError, JSONDecodeError,
  TOMLDecodeError, UnicodeError, DiscoveryError)
- control_room --view-engine rust also discovers with the binary
  (native_view_bridge.native_discover, clean environment, trust checks)
- engine_binary(): $ONTOLOGYEX_ENGINE_DIR, skill bin/, then the
  checkout's release and debug builds
- tests/rust_discover_parity.py: 49 edge-case repositories plus seeded
  manifest mutations; 0 mismatches over 24,000 mutated manifests
- Cargo.lock is now committed for reproducible release builds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
…oofs

A Rust drop-in for feeds.py: the same ONTOLOGYEX_FEEDS config, the same
observations and status files. HTTP probes and Prometheus targets are
polled in parallel; the OTLP/HTTP receiver (protobuf and JSON, gzip,
bearer token) runs on a small worker pool. No proxy, no redirects,
system trust store.

On a 4-core container: ~1.74M spans/s vs ~98k for feeds.py (17.8x),
8.3 MiB vs 41.5 MiB resident.

feeds.py is tightened where Rust could not match its quirks, refusing
input that was malformed anyway: URLs must be printable RFC 3986 with a
plain host and port; OTLP/JSON and Prometheus bodies are strict UTF-8
JSON with typed fields; truncated gzip is refused; the bearer token is
compared as bytes (a non-ASCII header no longer raises); a non-object
Prometheus response no longer crashes the runner; the status file's
folder is created when no rows were written.

Verification:
- tests/rust_feeds_parity.py: config validation, OTLP decoding (seeded
  byte mutations), Prometheus parsing, span-window replays, store merges
  byte for byte, `once` end to end, and the live receiver
- tests/feeds_conformance.py: classification, retention, and p95 rank
  tables compared across Python, Rust, and Lean
- Lean (OntologyEX.Feeds): down_is_error, threshold_inclusive,
  classify_monotone, keep_at_most, keep_from_input, dropped_are_older,
  p95_index_in_range
- CI runs both parity suites, the feeds conformance table for Rust and
  Lean, and cargo with --locked

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
- release-engine.yml: build the four binaries for Linux (static musl,
  x86_64 and arm64) and macOS (arm64, and x86_64 cross-built); run the
  discovery and feeds parity suites on each native build; on an
  engine-v* tag, publish the archives, SHA256SUMS, and a GitHub build
  provenance attestation. Pull requests build without publishing.
- fetch_engine.py: download a release over HTTPS from github.com only,
  check the archive against SHA256SUMS, and install only the expected
  binaries into the skill's bin/ (no traversal, symlinks, or extra
  files; no silent overwrite). Prints the gh attestation verify
  command. Shipped with the installed skill.
- docs/rust-engine.md: install, run, measured speedups, how parity is
  checked, what is proven, known differences, and how to release.
- README, live feeds, operating-picture reference: point to the engine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
Python 3.11.9's urlsplit accepts http://x[::1]/ and http://[::1]x/,
newer versions refuse them; check the shape explicitly so feeds.py and
ontologyex-feeds agree everywhere. The parity harness now prints only
the rows that differ in the end-to-end case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
A manual run of "Engine binaries" with version=engine-vX.Y.Z builds,
runs the parity suites, and publishes the release like a tag push,
creating the tag on the commit it built. The version reaches the shell
through an environment variable and must match engine-vX.Y.Z.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
ontologyex-feeds polls up to 16 targets at once. The fixture used
socketserver's default listen queue of 5, so on macOS the extra
connections were refused outright and the Rust run saw failed probes
where the sequential Python run did not. Linux queues them, which is why
only the macOS job failed (and only sometimes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoxWvtYbajXo6hFeADTXYF
@New1Direction
New1Direction merged commit 89c8fb2 into main Oct 28, 2026
10 checks passed
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