tools: drop artifacts/publish after passing verify gates - #35
Conversation
The AOT demos must publish into the standard artifacts/ layout (the prebuilt- Analyzer path contract forbids --artifacts-path), so every demo run leaves its ~50-150 MB NativeAOT publish output behind — a full matrix accumulates multiple GB on dev disks (observed: 1.6 GB publish/ inside a 7.5 GB artifacts/ tree). The publish tree is a pure verification byproduct: each verifier executes the binary and asserts within the same run. Both entry points (the goal orchestrator and the AOT-publish gate) now remove artifacts/publish after a fully passing run and report the freed size; failures keep it for inspection. --keep-publish opts out. Verified: ran the goal orchestrator --only "real sqlite demo" — demo passed, publish tree removed, exit 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (7)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds ChangesPublish output cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/verify_helpers.py`:
- Around line 13-29: The cleanup helper can raise an uncaught OSError and turn
an otherwise passing verification run into a failure. Update
remove_publish_outputs() to handle errors around the size scan and
shutil.rmtree, and make it return a safe summary message instead of letting
exceptions escape. Keep the behavior localized in remove_publish_outputs() so
the call sites in verify-aot-autoinstrumentation-goal.py and
verify-aot-publish-gate.py don’t need their own error handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3aaefa5f-7d76-4358-ab65-256bffc6e332
📒 Files selected for processing (3)
tools/verify-aot-autoinstrumentation-goal.pytools/verify-aot-publish-gate.pytools/verify_helpers.py
📜 Review details
⏰ Context from checks skipped due to timeout. (6)
- GitHub Check: webapi-aot-demo (macos-latest)
- GitHub Check: webapi-aot-demo (ubuntu-24.04-arm)
- GitHub Check: smoke (ubuntu-24.04-arm)
- GitHub Check: smoke (macos-latest)
- GitHub Check: verify (macos-latest)
- GitHub Check: verify (ubuntu-24.04-arm)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
**: # Qyl.OpenTelemetry.AutoInstrumentation agent rulesMission
This repository is the runtime AOT auto-instrumentation lane for qyl, evolving into a
self-describing observability substrate. The foundation is unchanged: .NET 10
NativeAOT-compatible zero-code instrumentation through managed build assets, source generation,
DiagnosticListener consumption, and module-initializer boot. The direction is the North Star
below.Keep this repository separate from:
- semantic-convention package generation (
Qyl.OpenTelemetry.SemanticConventionsis a referenced
vocabulary package, not generated here),- the old CLR-profiler/OpenTelemetry auto-instrumentation substrate.
North Star — declare and prove the whole stack
Every observability tool today is pull-by-observation: a backend learns what a service emits
by receiving samples over time, and never knows whether it has seen the whole surface. qyl has a
capability none of them have — because instrumentation is source-generated interceptors + a static
contract + a referenced semconv registry + (incrementally) DTO inference, the complete set of
telemetry a binary can ever produce is a compile-time-derivable fact, with provenance.The substrate goal: every qyl binary ships a complete, machine-readable Telemetry Capability
Graph (TCG) — the full possible OpenTelemetry surface for that exact binary, each capability
tagged compile-time-owned vs runtime-valued — and proves it by self-hosting (instrumenting its
own pipeline with its own mechanism, zero extra code). Any external entity consumes the TCG to know
the entire stack before a span is sampled. The contract becomes the shared semantic graph; an OTLP
backend is just one consumer.Three pillars:
- Self-host (the proof). qyl instruments qyl with qyl —
QylSelfTelemetry/
SemConvConformanceProcessorare the seed; the binary observing itself is how "declared TCG ==
runtime reality" is checked.- **Compile-time-complete TCG (the ar...
Files:
tools/verify_helpers.pytools/verify-aot-publish-gate.pytools/verify-aot-autoinstrumentation-goal.py
⚙️ CodeRabbit configuration file
**: Operating principles (solo-dev, agentic SDLC — reviews are advisory, agents act on them):
- LAZY: one self-contained, correct review beats ten partial ones. Every finding is
definitive — concrete evidence with file:line, a concrete fix, no "consider maybe",
no open or ambiguous questions back to the author. If you cannot decide a point
from the diff plus repo context, stay silent on it. Never cite a source, API, or
version you have not verified; an unverifiable claim is a dropped claim.- IMPATIENT: never stall a PR. There are no compatibility obligations here — internal
and dogfooding code has NO public-API contract; removing shims, breaking signatures,
and deleting dead paths are normal, desirable changes. Do not flag backward
compatibility, deprecation ceremony, or migration paths. (SemVer applies only to
commercially sold libraries — this repo has none.)- EGO: hold the bar of the best reviewer on the market — flag real correctness,
security, data-loss, and structural problems precisely; produce zero noise.
Files:
tools/verify_helpers.pytools/verify-aot-publish-gate.pytools/verify-aot-autoinstrumentation-goal.py
🔇 Additional comments (2)
tools/verify-aot-autoinstrumentation-goal.py (1)
10-11: LGTM!Also applies to: 130-134, 160-164
tools/verify-aot-publish-gate.py (1)
41-42: LGTM!Also applies to: 191-193, 247-250
shutil.rmtree after a green run is best-effort hygiene; an OSError (AV lock, IDE indexer, Windows handle) now degrades to a 'cleanup skipped' notice instead of crashing the gate post-success. CodeRabbit finding, verified with a read-only-dir simulation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The main slnx carried 39 projects, 30 of them Qyl.Real*Demo apps that each wire the source-interceptor generator as an analyzer — opening the solution in an IDE runs 30 generator pipelines on every edit, which is the remaining structural IDE-load source after the artifacts/publish cleanup (#35). Main slnx now carries src + tests + benchmarks (9 projects); the demo matrix lives in Qyl.OpenTelemetry.AutoInstrumentation.Demos.slnx. The goal orchestrator gains a 'demos release build' step directly after 'release build', so compile coverage of the demos is unchanged. nuget-publish packs individual projects and is unaffected. CLAUDE.md documents the split. Verified: both solutions build Release green; gate subset (contract invariants, release build, demos release build, package layout) passes. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Status: complete-and-verified
Problem: the AOT demo verifiers must publish into the repo's standard
artifacts/layout (redirecting via--artifacts-pathbreaks the prebuilt-Analyzer path contract documented inverify-aot-publish-gate.py), so every run leaves ~50–150 MB of NativeAOT output per demo. A full matrix accumulates multiple GB on dev disks — observed 1.6 GB ofpublish/inside a 7.5 GBartifacts/tree.Change:
verify_helpers.remove_publish_outputs()deletesartifacts/publishand reports the freed size. Both entry points call it only on a fully passing run:verify-aot-autoinstrumentation-goal.py— after all selected verifiers passverify-aot-publish-gate.py— after a passing gate (before the ok-line)Failures keep the tree for inspection;
--keep-publishopts out on both tools.artifacts/binandartifacts/objare deliberately untouched — deleting them would force full rebuilds andbincarries the prebuilt-Analyzer contract.Verification:
python3 tools/verify-aot-autoinstrumentation-goal.py --only "real sqlite demo"— demo AOT-published and verified, then printedremoved artifacts/publish (…MB), exit 0.py_compileclean on all three files;--listpaths unaffected.🤖 Generated with Claude Code