Repository navigation
test: expect GENERAL for roots of failed dependencies - #72
Merged
Merged
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>
Contributor
|
I wonder if our public documentation will need to surface this for how error codes work with dependent flags |
hhan2024
approved these changes
Nov 6, 2026
typotter
reviewed
Nov 6, 2026
typotter
reviewed
Nov 6, 2026
typotter
requested changes
Nov 6, 2026
Assert the atomic failure's evaluation events: the successful leaf, the missing prerequisite with FLAG_NOT_FOUND, and the requested root with GENERAL, with no exposures and no unmatched events. Add a transitive case where a configured parent depends on a missing prerequisite. The missing prerequisite reports FLAG_NOT_FOUND, and the configured parent and the requested root report GENERAL. State in the README that a specific error code applies only to the flag where the failure originates, and that every configured flag that fails because of a failed prerequisite reports GENERAL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
🤖 Response from AI: Probably yes, once dependent flags are in the public documentation. The customer-facing rule is short: when a flag's prerequisite fails, evaluating the flag returns the default value with reason |
This was referenced Nov 9, 2026
typotter
approved these changes
Nov 9, 2026
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.
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.dependent-atomic-error-root:dependent-leaf-onwith no error,dependent-missing-prerequisitewithFLAG_NOT_FOUND, and the requested root withGENERAL, with no exposures andnoUnmatchedEvents: true.dependent-transitive-error-root, where a configured parent (dependent-transitive-error-parent) depends on the missingdependent-missing-prerequisite. The case expectsFLAG_NOT_FOUNDfor the missing prerequisite,GENERALfor the parent and the requested root, and no exposures. The two new flags are inufc-config.json.GENERAL.The suite now has 15 cases. Downstream runners that assert the case count need to update it when they repin.
Native implementations checked
12fe487dependent-transitive-error-rootfails, because the intermediate parent reportsFLAG_NOT_FOUND. Controls: expectingFLAG_NOT_FOUNDon the atomic root, orGENERALon the missing prerequisite, fails the atomic case.983b4b0, with the dependent-flags suite runner proposed in its review (case count updated to 15)FLAG_NOT_FOUNDon the atomic root or on the transitive parent fails, and expectingGENERALon the missing prerequisite fails.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, and their event codes for intermediate prerequisites were not checked. The Go and Java native tests also cover depth-limit and cycle errors, and a .NET depth-limit probe returned
GENERAL.#62 at
ff462c0already expectsGENERALfor the failed root and configured parent, andFLAG_NOT_FOUNDfor the missing prerequisite, in its precomputed dependent-flags fixture.Testing
python3 ci/validate-fixtures.py: 2 evaluation suites, 382 evaluation cases across 48 files.python3 -m unittest ci/test_validate_fixtures.py: OK.🤖 Generated with Claude Code