Repository navigation
Generated-artifact drift: one typed observation per artifact; pure leaf/group expectations; delete the per-artifact live perturb loop - #7823
Merged
Conversation
… new observation policy witness_per_artifact_red_receipts called artifact_generate three times per committed artifact solely to reprove generated != generated+suffix — a generic string-inequality fact, not an artifact-specific one (DESIGN §6). Replaced with sub-millisecond constructed-fixture witnesses against gunbc.generated_artifact_observation's pure leaf/group/diagnostic functions, covering clean/drift/generation-refusal/committed-read-refusal/ extra-validation-refusal and group missing/duplicate/unknown identity. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
loyal-ram-550 review of #7823: the note claimed a bare reference to the producer inside the pure module "fails to compile" — DESIGN §4b Class B (open thread, #6985) means a bare cross-module reference can still resolve by pool-membership coincidence when an unrelated import elsewhere in the same closure has already dragged the target module in, which is close to guaranteed here since the sibling observation module imports both this module and the generator. Reworded to state the honest rung: mechanically-preventable-by-convention today (no import path exists), dissolving to structurally-impossible once the namespace lane's closure-independent binding fix lands. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
loyal-ram-550 review of #7823: artifact_extra_valid called artifact_generate(a: a) a second time for Stage0EmitPlanGeneratedDagArtifact and V1InterpreterDispatchGeneratedRsArtifact, discarding the content and keeping only success/failure — contradicting generated_artifact_observation_note's "one artifact_generate per artifact" claim, and the root cause of witness_extra_validation_wired's cost. artifact_extra_valid now takes the already-computed ArtifactGenerationOutcome instead of generating internally; observe_generated_artifact passes through the outcome it already produced. No second entry point to generation remains. witness_extra_validation_wired updated to supply the outcome per artifact the same way; its cost is not expected to drop since the two large artifacts still must be generated to answer their extra-validation bit. Also drops the unused GeneratedArtifactObservation import from generated_artifact_gate.dag flagged by review 48338 (claude/opus-4-7). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Aug 5, 2026
Merge main (#7772 N3-A, #7823) moved admission types to std and extended parse_authored_occurrence_binding_source / occurrence_binding_inputs_from_transport to three arguments. Update production_observations.dag and regen emitted stage0; restore generated-artifact registration for new emit modules. Co-authored-by: Cursor <cursoragent@cursor.com>
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Worker attestation
Summary
Fixes the redundant-producer defect the operator flagged in
dag/tools/generated_artifact_gate.dag: the healthy path performed 4artifact_generatecalls and 2 committed-file reads per artifact, andthe fast witness (
dag/test/claim/generated_artifact_drift_test.dag)independently called
artifact_generate3 more times per artifact via alive perturb loop that only reproved generic string inequality (DESIGN
§6), never an artifact-specific fact.
Adds
dag/gunbc/generated_artifact_observation.dag, a single typedGeneratedArtifactObservationmodel with three layers:observe_generated_artifact/_population) — oneFilesystem.Read, oneartifact_generate, oneartifact_extra_validper artifact, captured once as a retained receipt;
assess_generated_artifact_observation) — clean iffgeneration succeeded, the read succeeded, generated == committed, and
extra validation holds; reads only the retained receipt fields;
assess_generated_artifact_population) — an identityjoin (via the existing
artifact_eq, not count equality) assertingevery expected artifact identity is observed exactly once, no
unknown/duplicate observation, and every leaf receipt passes;
first_failing_observation_path,first_failing_diagnostic_path) that fold the same retainedpopulation to name the first leaf failure, falling back to a missing-
or unknown-identity path so a group-only failure never surfaces as an
empty diagnostic string.
dag/tools/generated_artifact_gate.dag'srun_generated_artifact_drift_gate_bodynow calls the live producer exactly once per gate run; the pass/fail
verdict and the failure diagnostic both read that one retained
population — no re-invocation of the producer, no rerun-as-remediation.
dag/test/claim/generated_artifact_drift_test.dagdrops the liveperturb loop (
perturb/artifact_drifted/artifact_red_receipt/witness_per_artifact_red_receipts) and replaces it with sub-millisecondconstructed-fixture witnesses against the new pure leaf/group/diagnostic
functions, covering: clean, one-byte-perturbed drift, generation
refusal, committed-read refusal, extra-validation refusal, and group
missing/duplicate/unknown identity — no
Filesystem/artifact_generatecalls in any of the new tests.
Out of scope (per the operator's brief): #7810, #7772, #7770, #7791,
#7816, #7817 are untouched; the long-lane fixed-point witness
(
dag/test/claim/long/generated_artifact_drift_fixed_point_witness_test.dag)is untouched.
Test plan
claim_batch --source-root dag --source-root src/v2 --entry dag/test/claim/generated_artifact_drift_test.dag --functions <all 20>—all 20 witnesses PASS; every new pure leaf/group/diagnostic witness
reports
0ms subject=... eval_self=0.000ms.gunbc run --source-root dag --source-root src/v2 --entry dag/tools/generated_artifact_gate.dag --function run_generated_artifact_drift_gate_body --dry-run—compiles with 0 problems and returns
ExitSuccessagainst the currentcommitted tree (the production gate call site).
cargo build --release --bin claim_batch --bin gunbc— green.Module split (loyal-ram-550 review, module-grain purity)
gunbc.generated_artifact_observation(the live producer) andgunbc.generated_artifact_assessment(the pure type + leaf/group/diagnostic predicates) are now two modules, not one. The assessment
module imports
gunbc.generated_artifactonly —Filesystemandgunbc.generated_artifact_emit'sartifact_generate/artifact_extra_validappear nowhere in it. The observation module imports the assessment
module (never the reverse), so the dependency edge runs producer →
pure, one direction only.
Honest rung, corrected in-file: the assessment module's note
originally claimed a bare
artifact_generatereference written insideit (no import added) "fails to compile." That overstates what the
substrate currently guarantees. DESIGN §4b Class B (open thread, #6985)
means a bare cross-module reference can still resolve by
pool-membership coincidence when an unrelated import elsewhere in the
same compiled closure has already dragged the target module into the
pool — and here
gunbc.generated_artifact_observationimports both theassessment module and the generator, so that coincidence is close to
guaranteed in every real closure. The note has been reworded: today's
guarantee is mechanically-preventable-by-convention (no import path
exists; any future import is immediately visible to review), not
structurally-impossible; it dissolves into the stronger claim once
the namespace lane's closure-independent binding fix lands. This is
the correct rung per DESIGN §4b rather than an inflated one.
Cost: producer is an integration operation, not an ordinary witness
observe_generated_artifact_population(9Filesystem.Read+ 9artifact_generate+ 9artifact_extra_validcalls, one per committedartifact) was measured directly, in isolation, via a disposable
scratch witness that called it exactly once (not committed; deleted
after measurement). Executed wall-clock for evaluating that single
call: 6709ms. That is well above the ordinary 500ms
mandatory-migration threshold, and that is expected and fine: it
executes exactly once per
run_generated_artifact_drift_gate_bodycall (the gate/regen path), not per witness and not per artifact. None
of the 13 new pure witnesses in
dag/test/claim/generated_artifact_drift_test.dagcallobserve_generated_artifact_populationorassess_generated_artifact_live_population— every one of them isfixture-only, constructing
GeneratedArtifactObservationvalues byhand and driving the pure leaf/group/diagnostic functions directly, at
eval_self=0.000ms. The higher-order pure checks consume theproducer's one retained population; nothing re-invokes it. This is the
operator's prescribed routing for an over-500ms producer — an
integration operation living in the gate/regen path — not a violation,
and nothing here is being moved to
long/.Separate, unowned, out-of-scope finding
witness_extra_validation_wiredindag/test/claim/generated_artifact_drift_test.dagis a pre-existingwitness, unmodified by this PR, that reads the live tree and measures
~1971ms — roughly 4x the 500ms threshold. It is not covered by this
PR's module split or migration and is not being routed here;
flagging it explicitly so it is not laundered as "the file is clean
now." loyal-ram-550 has been notified and will route ownership/a fix
separately.