Skip to content

floci-gcp declares no endpoint env var, so chant emulator up boots an emulator the GCP read path never reaches #1431

Closed

Description

@lex00

Blocks: #1211 (E·gcp runtime-e2e) · Found from INTENTIUS/behold#125 / behold#126

The gap

FLOCI_GCP_EMULATOR injects nothing:

// lexicons/gcp/src/op/activities/floci-gcp.ts
/**
 * `env` is deliberately empty: `gcpApply` reaches the emulator through an
 * explicit `endpoint` argument rather than an ambient variable, so there is no
 * var to inject and claiming one would be worse than claiming none.
 */
export const FLOCI_GCP_EMULATOR: EmulatorCapability = {
  spec: FLOCI_GCP_SPEC,
  env: () => ({}),
};

That rationale is correct about the applier and no longer correct about the reader. Both GCP read paths take their endpoint from an ambient variable:

lexicons/gcp/src/describe-resources.ts:139:  const endpoint = process.env.GCP_ENDPOINT_URL;
lexicons/gcp/src/deep-observe.ts:210:      const endpoint = process.env.GCP_ENDPOINT_URL;

Compare azure, which does inject:

export const FLOCI_AZ_EMULATOR: EmulatorCapability = {
  spec: FLOCI_AZ_SPEC,
  env: (endpoint) => ({ AZURE_ENDPOINT_URL: endpoint }),
};

Why it drifted

Two commits the same afternoon, in this order:

when commit what
2026-08-02 19:41 9200d0d9 #1345/#1368 declares the capability, env empty — true at the time
2026-08-02 21:34 7f4e985e #1209/#1375 moves observation onto direct REST, reading GCP_ENDPOINT_URL

The comment was accurate for about two hours. Nothing re-checked it when the reader landed, and outside tests setting it by hand, nothing in the repo writes GCP_ENDPOINT_URL at all — only the two readers consume it.

Consequence

chant emulator up --lexicon gcp boots floci-gcp on :4588 and reports the endpoint, while leaving GCP_ENDPOINT_URL unset. chant's own GCP read path therefore points at real GCP — so lifecycle diff --live, components status --live and anything downstream either fail on credentials or, worse, read a real project.

endpointEnvVars(capability) derives its list from capability.env(ENDPOINT_PROBE), so an empty env also means core believes gcp has no endpoint variable, which is what #1345's own module note warns about for the map it replaced.

This is squarely on #1211's path: a $0 CC round-trip on floci-gcp cannot observe anything if the reader is not pointed at the emulator.

Fix

env: (endpoint) => ({ GCP_ENDPOINT_URL: endpoint }),

and reword the note so it says what is now true: the applier takes an explicit endpoint argument, the reader takes the ambient variable, and the capability injects for the reader's sake.

Acceptance criteria

  • chant emulator up --lexicon gcp leaves GCP_ENDPOINT_URL pointed at the booted emulator.
  • endpointEnvVars reports GCP_ENDPOINT_URL for the gcp capability.
  • A --live read against a booted floci-gcp reaches the emulator with no manual export.

Related

behold#125 was the mirror of this on the consumer side — behold's target lens omitted gcp for the same "nothing to point at yet" reason, which expired the same way. behold sets the variable itself for its own shell-outs, so behold is not blocked; anyone relying on chant emulator up is.

Activity

  1. added a commit that references this issue on Aug 3, 2026
    46d08dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions