fix(module-ci): create a module's intent, or the first one of a kind 404s - #16
Merged
Merged
Conversation
…404s
A modules repo could not carry a module whose intent the Control Plane had
never seen. The upload failed outright:
Error: upload failed with status 404: {"message":"Intent gcs not found"}
Nothing else creates an intent. raptor create resource-type-mapping rejects
one it does not know, so there was no way through from CI at all — a repo
bootstrapped against one Control Plane could not be published to another.
raptor already has the flag. Pass --auto-create on the two steps that
upload: preview registration and publish. It is deliberately NOT passed to
the --dry-run validation, which never touches the intent.
Gated behind a new auto-create-intents input, default true, because the flag
does two things and the second is shared state. Besides creating a missing
intent, --auto-create rewrites an existing intent's metadata from the
uploading module's intentDetails. An intent is shared by all its flavors, so
two flavors that disagree fight, and the last module published wins. A real
example from vibe-modules: cloud_account/gcp_provider says displayName
"Cloud Account" while cloud_account/gcp_org_provider says "GCP Org Cloud
Account", for the same intent.
Keeping intentDetails identical across the flavors of one intent is the
right answer, and the README now says so. auto-create-intents: 'false'
freezes the metadata instead, at the cost of failing on any new intent.
Verified against a live Control Plane: with the flag, gcs/standard/1.0
uploaded and registered the gcs intent; re-running without it then succeeded,
which proves the intent persisted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
A modules repo could not carry a module whose intent the Control Plane had never seen. The upload failed outright:
Nothing else creates an intent —
raptor create resource-type-mappingrejects one it does not know — so there was no way through from CI at all. A repo bootstrapped against one Control Plane could not be published to another.Hit for real:
vibe-modulescarriesgcs,firestore,service_accountandartifact_registry; all four failed preview registration this way, and a directraptor create iac-modulefailed identically.The fix
raptor already has the flag. This passes
--auto-createon the two steps that upload:raptor create iac-module -f "$dir" $AUTO_CREATE --feature-branch --git-ref …raptor create iac-module -f "$dir" $AUTO_CREATEIt is deliberately not passed to the
--dry-runvalidation, which never touches the intent — confirmed by dry-runs passing while the intent was absent.Why it is behind an input
--auto-createdoes two things, and the second is shared state:An intent is shared by every flavor under it. Two flavors that disagree will fight, and the last module published wins. That is not hypothetical — it is already true in
vibe-modules:intentDetails.displayNamecloud_accountgcp_providercloud_accountgcp_org_providerSo
auto-create-intents(defaulttrue) can be set tofalseto freeze intent metadata, at the cost of failing on any new intent. The README gains an Intents section explaining the shared-object model and saying plainly that keepingintentDetailsidentical across a flavor set is the right answer, and a difference is a repo bug.Default is
truebecause without it the action simply cannot bootstrap a fresh Control Plane, which is the bug being fixed.Verification
gcs/standard/1.0uploaded and registered thegcsintent. Re-running without the flag then succeeded, proving the intent persisted.true,false, and unset (unset defaults to on).action.ymlparses, 12 inputs, 0 shellcheck findings across all embedded scripts.Not in scope
Two further gaps in the same area, both needing work outside this action:
raptor module get-output-type -o yaml→raptor create output-type -f), but the repo carries no output-type files —ModulesRepoBootstrapService.exportModulesandraptor module sync-repoboth export modules only, and the generated workflow filters onmodules/**. Needs control-plane work first.facets.yaml, so the publish loop skips it and the module stays published.🤖 Generated with Claude Code