Repository navigation
Conversation
Pin errorCode GENERAL on the roots of the atomic missing-prerequisite, depth-limit and cycle cases in the dependent-flags suite, and document the rule: the root of a failed dependency returns the caller default with ERROR/GENERAL, while the failed prerequisite's own evaluation event keeps its specific error code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I wonder if our public documentation will need to surface this for how error codes work with dependent flags |
| "flag": "dependent-atomic-error-root", | ||
| "result": { | ||
| "reason": "ERROR", | ||
| "errorCode": "GENERAL", |
There was a problem hiding this comment.
🤖 Comment from Codex working with @typotter:
[P1] Add evaluation-event expectations for the atomic failure case.
This result assertion verifies that the requested root uses GENERAL, but the case has no evaluationEvents matcher. An implementation can therefore change the missing prerequisite's event from FLAG_NOT_FOUND to GENERAL and still pass this fixture, although the README requires the prerequisite to keep its specific error.
Please make the atomic case assert the successful leaf event, the missing prerequisite with FLAG_NOT_FOUND, the requested root with GENERAL, no exposures, and noUnmatchedEvents: true. This case has no intermediate ancestor, so it can enforce the distinction without depending on the transitive-error decision.
|
|
||
| In `dependent-flags`, when dependency evaluation fails (a reached prerequisite is | ||
| missing or has no assignment, the depth limit is exceeded, or a cycle is found), | ||
| the root returns the caller default with reason `ERROR` and error code `GENERAL`. |
There was a problem hiding this comment.
🤖 Comment from Codex working with @typotter:
[P2] Define the error code for configured intermediate ancestors.
This wording does not classify a transitive graph such as requested root → configured parent → missing leaf. The configured parent is both a prerequisite of the requested root and the root of its own failed dependency evaluation.
Please state that a specific error code applies only to the node where that error originates. A missing node therefore uses FLAG_NOT_FOUND, while every configured ancestor that fails because of it, including intermediate flags and the requested root, uses GENERAL. A transitive fixture can then enforce this rule without relying on implementation precedent.
Motivation
The dependent-flags suite leaves the root error code unspecified for missing prerequisites, depth-limit failures and cycles.
dependent-atomic-error-root,dependent-depth-three-rootanddependent-cycle-acheck reasonERRORand the caller's default value, but not the error code. Implementations differ: some copy the prerequisite's code to the root (FLAG_NOT_FOUNDwhen the prerequisite is missing), and others returnGENERAL.GENERALis the better root code. The root flag exists, soFLAG_NOT_FOUNDon the root reports a flag-not-found error for a flag that is configured.dependent-no-assignment-rootalready expectsGENERALfor the root and for the failed parent.Changes
"errorCode": "GENERAL"to the results ofdependent-atomic-error-root,dependent-depth-three-rootanddependent-cycle-a.ERRORand error codeGENERAL, and the failed prerequisite's own evaluation event keeps its specific code. This PR does not add evaluation-event matchers to these three cases.Native implementations checked
12fe487FLAG_NOT_FOUNDon the atomic root fails.983b4b0, with the dependent-flags suite runner proposed in its reviewFLAG_NOT_FOUNDon the atomic root fails (actualGENERAL).ed55d61GENERAL(probe). No shared-suite runner yet.f1976f6GENERALfor prerequisite failures (module tests).3ed5311FLAG_NOT_FOUNDfor the atomic root (probe), so it needs a change.JS and libdatadog were run against the modified fixtures. The Go, Java and .NET results come from earlier probes and native tests; those implementations were not rerun against this change. The Go and Java native tests also cover depth-limit and cycle errors, and a .NET depth-limit probe returned
GENERAL.#62 expects
FLAG_NOT_FOUNDfor the root in its precomputed dependent-flags fixture. If this rule is accepted, that fixture should follow it.Testing
python3 ci/validate-fixtures.py: 2 evaluation suites, 381 evaluation cases across 48 files.python3 -m unittest ci/test_validate_fixtures.py: OK.🤖 Generated with Claude Code