Skip to content

index: a read-only cloud lister over each cloud's inventory API, for behold index #1029

Closed

Description

@lex00

A read-only cloud lister in behold, written in TypeScript, that behold index calls to fill the index straight from cloud APIs. This is tier 1 of #1025, the cloud source researched in #1023. It reads inventory and writes nothing to the cloud.

Wave 1. Moved from choudoufu on the maintainer's ruling (2026-10-26): the lister is generic, so it lives with its only caller.

Why not choudoufu's sweeps

choudoufu's sweeps answer an engine's question: which objects carry this estate's marker. An index asks a different one: what is in this account. Each cloud has an inventory API built for that, so behold calls those and needs nothing from choudoufu:

Substrate Inventory API Note
AWS Cloud Control ListResources, per type some types need a parent identifier; a type that cannot be listed is reported
Azure Resource Graph, one query per scope covers every ARM type with one call shape
GCP Cloud Asset Inventory searchAllResources the API has to be enabled on the project; if it is not, say so and stop
Kubernetes discovery, then LIST per served kind through the k8s client behold already uses

The engines keep their sweeps, and #1024's other children still read ownership from the markers that come back in the tags and labels.

What it does

It writes one record per resource, in the index's node schema (#1025, INTENTIUS/chant#4520):

  • the substrate, the type as the cloud names it, and the region or location;
  • every cloud ID the listing returns (ARN, ARM ID, GCP resource name, Kubernetes UID);
  • the tags or labels, including any ownership markers left by choudoufu, plunge or chant;
  • the properties the listing returns, unnormalized;
  • observedAt.

The scope comes from behold index flags: account, subscription, project or cluster; regions; types; a tag filter.

Also settles

From #1023, which now covers only edge derivation and false joins:

  • Listing cost. Time and API calls to list an account, full and narrowed by region, type or tag. A tag filter finds only tagged resources, so say what full listing costs.
  • Credentials. The narrowest read-only role or reader assignment for each cloud, written down so a person can create it.

Rules

  • Read-only by construction. Only listing and get clients are built. There is no estate, no record store and no write call.
  • No project or configuration is read. It works in an empty directory.
  • A type it cannot list goes in the output's notes with the reason. It is never skipped silently.
  • Secret-bearing properties are masked before anything is stored.
  • Nothing is enabled for the person. Asset Inventory has to be enabled on a GCP project before it can be read, and enabling it is a change to the project. If it is off, the lister says so, prints the command that enables it, and lists nothing for that project. Tier 1's docs say the same.

Done when

  • A test fails if any mutating API is reachable from the lister. Show it red first by adding one.
  • A type with no lister appears in the notes with its reason.
  • Each substrate lists against an emulator, or a recorded fixture where no emulator serves the inventory API, and the recorded output has the fields above. Which emulators serve these APIs is unchecked, so the first step is to find out. The maintainer runs anything against an emulator or a real cloud.

Part of #1024 (the graph query epic). Design: #1025.

Acceptance: verdict lines and recorded artifacts, never exit codes alone. Red-first only for new guards.

Activity

  1. added
    epic:graph-query
    wave:1
    on Oct 26, 2026
  2. transferred this issue fromINTENTIUS/choudoufuon Oct 26, 2026
  3. changed the title [-]index: a read-only lister over the public sweeps, for behold index[/-] [+]index: a read-only cloud lister over each cloud's inventory API, for behold index[/+] on Oct 26, 2026
  4. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Ruling for consolidation-graph (2026-10-26): "probably behold if its generic enough". It is generic: it reads each cloud's inventory API and uses none of the engines' sweeps, so it lives in behold, moved here from INTENTIUS/choudoufu#2283. It runs inside behold index, so it needs no command name of its own. This also answers #1023 question 6.

  5. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Which pinned emulators serve the inventory APIs

    Read from source at the pinned images' commits. Nothing was run. The pins are choudoufu live/floci-image (floci c688f52ee, per choudoufu 6a3b59036a), live/floci-gcp-image (floci-gcp 641e6e8, choudoufu c97e9f6283), live/floci-az-image (floci-az 7f079c2, choudoufu 07bc01f104) and live/kind-node-image (kindest/node:v1.37.0).

    Substrate API Served by the pin Read sites
    AWS Cloud Control ListResources yes lex00/floci src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlJsonHandler.java:24-38 (dispatch), :93-105 (response), CloudControlService.java:282-312 (per-type switch, then CloudControlStoreLister)
    Azure Resource Graph POST /providers/Microsoft.ResourceGraph/resources yes lex00/floci-az src/main/java/io/floci/az/services/resourcegraph/ResourceGraphHandler.java:33-76, docs/services/resource-graph.md
    GCP Cloud Asset searchAllResources yes, under the path prefix /cloudasset lex00/floci-gcp src/main/java/io/floci/gcp/services/cloudasset/CloudAssetController.java:17-40, CloudAssetService.java:79-112
    Kubernetes discovery, then LIST yes: kind runs a real API server n/a

    Details that change what an emulator run proves:

    • floci, AWS. One correction to design: the index - a read-only graph any source fills, in three tiers (indexed, declared, managed) #1025's data point: at c688f52ee, GetResource is served (CloudControlJsonHandler.java:27, :40-50). It reads through listResources, then falls back to what CreateResource recorded (CloudControlService.java:234-248). The UnsupportedOperation answer belongs to any other action (:35-36). ListResources ignores NextToken, MaxResults and ResourceModel, so paging and parent-identifier types are not exercised. A type floci does not model returns an empty list, not an error. The hand-written switch covers 25 types, and the store lister covers others by matching class names (CloudControlStoreLister.java:22-55). An empty listed entry on floci is therefore weaker evidence than one on AWS. floci never answers UnsupportedActionException or TypeNotFoundException for a list, so the lister's "no lister" note for AWS is covered by a fake, not by the emulator.
    • floci-az, Azure. It serves the KQL subset the lister sends (where, in~, union with a subquery, project, order by), plus $top/$skipToken paging and lowercase type, as Azure does. join and other aggregations answer 400 InvalidQuery, and facets is always empty.
    • floci-gcp, GCP. The emulator mounts the API at /cloudasset/v1/... because /v1/projects belongs to IAM. A host-mode rewrite exists for a cloudasset.* Host header (core/common/routing/ServiceRoutingFilter.java), so the endpoint to pass is http://localhost:4588/cloudasset. Only project scopes are served (folder and org answer UNIMPLEMENTED, CloudAssetService.java:114-121). Assets come from four sources: Compute, GCS, IAM and Pub/Sub (*AssetSource.java). The query subset is labels.K=V, labels.K:V, tagKeys, tagValues and tagValueIds, joined with AND (AssetQuery.java:13-15), and there is no location term, so the lister filters locations itself. SERVICE_DISABLED is answered exactly as GCP answers it (403 PERMISSION_DENIED, ErrorInfo reason SERVICE_DISABLED, core/common/ServiceUsageGate.java:20-100), but only with floci-gcp.services.serviceusage.enforcement-enabled: true. That setting defaults to false (application.yml:166-169). The "API is off" path can therefore be shown on the emulator by starting it with enforcement on and leaving cloudasset out of default-enabled, without any enable call.
    • kind, Kubernetes. Nothing to check: discovery and LIST are the real API server's.

    So every substrate can be listed against a pinned emulator. No recorded fixture is needed for any of the four. The unit's tests fake each API, with shapes taken from the files above. The emulator runs are the maintainer's.

  6. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Landed on integration/consolidation-graph

    Merge commit 2a3190affb4485275eafdc798cce5be93fc8ccea (unit branch unit/cg-behold-1029, 9ab1eb5e). Checked with npm ci and npx tsc --noEmit against published chant 0.124.52. The tests are written but have not been run.

    What it is

    src/cloud-lister/, a library that behold index (#1026) calls. It adds no command (ruling of 2026-10-26). listCloud(scope, target, options) lists one substrate and one account, subscription, project or cluster (#1025 ruling Q6) and returns #1025's ListingResult:

    • resources[] (ListedResource): id in the ruled path style <substrate>/<scopeId>/<location>/<listedType>/<nativeId> (Q2), with % and / escaped in the first four parts only, so the native id stays verbatim and parseListedNodeId gives the parts back. Each also carries listedType, location, nativeId, cloudIds, tags, properties as returned (masked), observedAt, and a nested facts holding only markers, cloudIds and observedAt (Q1). ownership, ownedBy and recordVersions stay absent.
    • coverage[], one entry per (type, location) attempted: listed, or chant's UnobservedReason (unsupported-kind, no-credentials, read-failed, filtered). Under a tag filter every entry reads filtered. "*" means every type or location. A reader that does not know the wildcard matches nothing and so reads not observed, which is the safe direction.
    • notes[], typed by code: no-lister, needs-parent, api-disabled (with command), read-failed, no-credentials, default-types, tag-filter.
    • cloudIds use chant#4520's ruled kinds: an ARN is arn, the Cloud Control identifier is import-id, an ARM id (original and lowercased) or a GCP asset name is provider-id, a GCP selfLink is self-link, and a Kubernetes UID is k8s-uid.
    • markers use chant#4520's shape with source: "live", read from choudoufu's tofu-estate/tofu-address (escaped), then plunge's plunge-stack/plunge-urn (plain on tags, digest on labels), then chant's per-lexicon ChannelKeys. When an object carries several, the first in that order wins. All tags stay in tags.

    Per substrate:

    Substrate Call Notes
    aws Cloud Control ListResources, SigV4 signed by hand (sigv4.ts), paged with NextToken Regions must be named. types: "*" lists 30 default types and adds a note. Global types (IAM, CloudFront, Route 53, Organizations, Global Accelerator) are listed once as global. The tag filter is applied after listing. UnsupportedAction and TypeNotFound give no-lister, a ResourceModel error gives needs-parent
    azure one Resource Graph query, paged with $skipToken Types, locations and tags go into the KQL. Values are checked against a plain character set, never escaped. Resource groups are included through union ResourceContainers
    gcp searchAllResources on the project, paged SERVICE_DISABLED means nothing is listed, coverage reads read-failed, and the note's command is gcloud services enable cloudasset.googleapis.com --project=<p>. Locations are filtered after the call. For floci-gcp the endpoint is http://localhost:4588/cloudasset
    kubernetes discovery, then LIST per listable kind, paged with continue Location is the namespace, or cluster for cluster-scoped kinds. types: "*" leaves out Events and Leases and adds a note. managedFields is dropped. A Secret's data, stringData and last-applied annotation are masked whole. kubeTargetFromKubeconfig takes a token, a token file or a client cert and key, and refuses exec and auth-provider

    The goal's rules, and where they are enforced

    • Read-only: no cloud SDK client is built. Every request is a WireCall through Transport.send, which runs assertReadCall first (guard.ts). The call is classified from the wire (method, path, X-Amz-Target) against READ_OPERATIONS: cloudcontrol:ListResources, resourcegraph:resources, cloudasset:searchAllResources, k8s:discovery, k8s:list. No Service Usage call is admitted, so enabling Asset Inventory cannot be reached.
    • Never a public cloud during an emulator run: when a target names an endpoint (or a cluster server), the transport pins every call to that origin and throws OriginRefused otherwise.
    • Credentials: with an endpoint, the run requires static credentials (an AWS key pair, an Azure bearer token, a GCP token, or token: null for an anonymous floci-gcp) and throws ListerConfigError without them. No chain is consulted. Only a run with no endpoint may use the SDK chains (fromNodeProviderChain, DefaultAzureCredential, GoogleAuth). Those come from optional peer dependencies (@aws-sdk/credential-providers, @azure/identity, google-auth-library), imported lazily by a non-literal specifier, so behold's install and bundle do not grow. The lister reads no environment variable.
    • Masking: chant's SENSITIVE_KEY_PATTERNS are applied at every depth, including {Key, Value} pairs and tags, before the result exists. Published chant does not ship sensitive-key yet, so the list is copied, and shape.test.ts compares it with chant's when the installed chant has the module.

    Tests (written, not run)

    • guard.test.ts covers this issue's first done-when item. The allowlist is pinned to exactly the five operations above and may name no write. 24 mutating calls are refused by the guard without reaching the fetcher, among them Cloud Control Create/Update/Delete/Cancel, ARM PUT/DELETE/provider actions, Service Usage :enable and :batchEnable, POST searchAllResources, Asset feeds and export, and k8s POST/PUT/PATCH/DELETE, watch, exec and proxy. Every call each lister makes against fakes classifies into the allowlist. A static scan finds no PUT, PATCH or DELETE, no Cloud Control target other than ListResources, no Service Usage host and no SDK client import. Red first: add "cloudcontrol:CreateResource" to READ_OPERATIONS.aws, or a method: "PUT" call to any lister, and it fails. That still needs a run.
    • aws.test.ts, azure.test.ts, gcp.test.ts and kubernetes.test.ts run each lister against fakes whose response shapes come from the pinned emulators' source. They cover paging, the fields above, masking, markers, the notes for a type with no lister (the second done-when item), tag-filter coverage, and that with an endpoint and no static credentials the run is refused and the chain counter stays at 0. The GCP disabled-API case asserts one call (the search) and nothing to Service Usage. aws.test.ts checks SigV4 against AWS's get-vanilla known answer.
    • shape.test.ts covers ids, masking and markers.

    Also settled (from #1023)

    docs/design/cloud-lister.md covers the narrowest grant per cloud (AWS cloudformation:ListResources plus each type's handlers.list.permissions, or ReadOnlyAccess; Azure Reader; GCP roles/cloudasset.viewer; a k8s ClusterRole with list), the API that must be enabled by hand, and listing cost as call counts derived from the code. Time per call is unmeasured.

    Still missing, or for a run

    • Maintainer run, done-when 3: each substrate listed against its pinned emulator, with the recorded output checked for the fields above. That needs behold index (behold index <substrate>: fill an index from a cloud with no project, read-only #1026) or a small driver. My emulator comment above has the endpoints. On floci-gcp, the disabled-API path needs serviceusage.enforcement-enabled: true, with GOOGLE_APPLICATION_CREDENTIALS unset and CLOUDSDK_CONFIG empty under the goal's GCP rule. Unticked.
    • Test run at epic-ready: the vitest files above, including the red-first demonstration. Unticked.
    • Listing cost in time per call, measured. Waits on the runs above.
    • When chant ships the index-schema types (design: the index - a read-only graph any source fills, in three tiers (indexed, declared, managed) #1025 Q5) and sensitive-key, types.ts becomes a re-export behind src/chant-release.ts, and mask.ts imports chant's list.
    • One open choice I took without asking: "*" as a coverage wildcard. The alternative was listing only (type, location) pairs that returned objects, which would make a type with zero objects read as not observed. The wildcard is safe for readers that do not know it. chant#4521 and index: what changed between two reads, drawn as an overlay #1028 should treat "*" as match-all.

    No acceptance box is ticked.

  7. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Note for consolidation-graph (2026-10-26): where the index command lives, weighed after the maintainer asked whether it belongs in chant ("chant index").

    Already in chant: the store (chant#4519), typing listed resources (#4521), derived edges (#4522), the identity matcher (#4523), and the consumers chant search --index (#4525), chant import from an index (#4524) and drift from an index (#4526). In behold: this lister, the behold index command (#1026, merged e98e04b), the graph pane (#1027) and the diff overlay (#1028). So the open part is only who reads the clouds' inventory APIs.

    • For behold: reading the clouds is investigation, behold's job; the inventory clients and their credential handling stay out of chant's runtime; it follows the 2026-10-26 ruling and is built. behold standalone (Terraform only, Pulumi only, or cloud native only) works either way, since behold takes its model from chant as a library.
    • For chant: chant's index consumers (#4524-#4526) are chant commands, but the only producer is behold, so a chant-only user has to install behold to fill an index.
    • Cost of moving later: low. src/cloud-lister/ imports only @intentius/chant and node built-ins, nothing from the rest of behold; a move is a file move plus a thin chant index that behold index calls.

    Maintainer's current lean: the index may belong in behold. Recommendation: keep it here; revisit when #4524-#4526 reach chant-only users.

  8. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Ruling for consolidation-graph (2026-10-26): behold is a control plane; every model lives in chant.

    Question: should behold be only a control plane (it drives, shows and queries) with every model in chant?
    Answer: Yes, move models now. Record the rule. In this session: the lister moves to chant as chant index (behold index calls it), the index diff is computed in chant, behold's value-match.ts is retired in favour of chant's edge and identity passes, and the LadybugDB layout is generated from chant's schema.

    Context from the maintainer the same day: chant is the origin of the identity-marker model; choudoufu and plunge are engines for chant (and standalone); behold takes its model from chant and works standalone with Terraform only, Pulumi only, or cloud native only. This reverses the 2026-10-26 ruling that the lister lives in behold (behold#1029). behold keeps: the pane, kiosk and overlays, Cypher over a session projection, the MCP surface, chant Ops pass-through, the demos.

  9. lex00 commented on Oct 27, 2026

    @lex00
    ContributorAuthor

    Ready for the maintainer (consolidation-graph, 2026-10-27)

    behold main is 8b74db5, whose tree equals the epic-ready tested tip fd1dd6a. chant main is 47b8594e3.

    Per the ruling at #1029 (comment) the lister moved to chant as chant index (chant#4532), and behold index calls it. The code is under packages/core/src/cloud-lister/ on chant main, with docs/design/cloud-lister.md. The emulator survey is #1029 (comment): every pinned emulator serves its substrate's inventory API.

    What epic-ready proved: chant's unit vitest at b6281ef154 passed with no failure under cloud-lister/, which includes guard.test.ts (the five-read allowlist, every mutating call refused, the origin pin, every call each lister makes on the allowlist) and the per-substrate tests with the no-lister notes. That covers done-when 1 and 2 as tests. I found no record that the guard was shown red first by adding a mutating call. That part of done-when 1 is unconfirmed.

    Left: done-when 3, each substrate listing against its emulator, with the recorded output holding the fields in the body.

    • aws on floci: run sheet A1
    • gcp on floci-gcp: C4
    • azure on floci-az: D4
    • kubernetes on kind: E1

    Commands: run sheet entries A1, C4, D4 and E1 in engine-wt/goals/consolidation-graph-1-runs.md.

  10. lex00 commented on Nov 16, 2026

    @lex00
    ContributorAuthor

    Done-when 3: each substrate against its emulator

    These are the old run sheet's four runs for this issue. They used chant 0.124.101 from the behold worktree, and the stamp reads chant-lister 0.33.2. Each command ran under a scratch HOME. GOOGLE_APPLICATION_CREDENTIALS was unset, CLOUDSDK_CONFIG was empty and no AZURE_* or ARM_* variable was set. The emulator runs pass --endpoint, and no real cloud was reached.

    C4: gcp on floci-gcp

    The emulator is the digest in live/floci-gcp-image, started with docker run -d -p 127.0.0.1:14588:4588 -e FLOCI_GCP_DEFAULT_PROJECT_ID=behold-c4. I seeded it through its own HTTP endpoints with a bucket carrying labels tofu-estate=demo and env=test, a network, a subnetwork, a disk, a VM labelled tofu-estate=demo and role=web, and a Pub/Sub topic labelled env=test.

    behold index gcp --project behold-c4 --endpoint http://127.0.0.1:14588/cloudasset --anonymous --store local:<dir>
    
    gcp behold-c4: 6 nodes (6 typed, 0 of unknown kind), 0 derived edges
    coverage: 1 (type, location) listed, 0 not observed
    behold index: wrote 20261116T192717Z-1492626b99fe.json under cloud/gcp/behold-c4/a8e2d474ec83
    

    The notes list is empty, and the six nodes are the six seeded resources.

    Field Result Example
    substrate there lexicon gcp; substrate gcp in the stamp scope
    type there listedType compute.googleapis.com/Instance, kind GCP::Compute::Instance
    location there us-central1-a (VM), us (bucket), global (network)
    cloud id there one provider-id, //compute.googleapis.com/projects/behold-c4/zones/us-central1-a/instances/behold-c4-vm
    labels there tags {"role":"web","tofu-estate":"demo"} on the VM
    markers there on the VM and bucket {"owner":"demo","encoding":"escaped","source":"live"}; the topic has none
    properties partly attrs keeps assetType, displayName, location, name, project; the emulator's createTime and the bucket's updateTime are dropped
    observedAt there facts.observedAt and the stamp
    coverage there one * / * entry, listed

    The Pub/Sub topic has no location in the emulator's answer and the node gets global.

    For the API-disabled path I started a second container with -p 127.0.0.1:14589:4588 -e FLOCI_GCP_SERVICES_SERVICEUSAGE_ENFORCEMENT_ENABLED=true. cloudasset.googleapis.com is not in its default-enabled list, and it answers 403 PERMISSION_DENIED. Nothing was enabled.

    gcp behold-c4: 0 nodes (0 typed, 0 of unknown kind), 0 derived edges
    coverage: 0 (type, location) listed, 1 not observed
      note: Cloud Asset API is disabled on project behold-c4, so nothing was listed for it. chant never enables an API; enabling it changes the project. To list it, run the command yourself and index again.
    

    The stored version, 20261116T192801Z-a6e83115d4f7.json, has verdict read-failed and no nodes. Its note is of kind api-disabled and its command field reads gcloud services enable cloudasset.googleapis.com --project=behold-c4.

    That command is the first thing wrong. The stored note holds it, but the CLI prints only the message, which tells the reader to run a command it never shows. --json reduces notes to plain strings and also leaves it out. The issue says the lister prints the command.

    D4: azure on floci-az

    The emulator is the digest in live/floci-az-image, started with docker run -d -p 127.0.0.1:14577:4577 -e FLOCI_AZ_STORAGE_MODE=memory -e FLOCI_AZ_PARITY=azure. It ran over plain HTTP, so the TLS path was not exercised. A dummy bearer token and ARM PUTs seeded a resource group tagged tofu-estate=demo. The same calls added a virtual network with one subnet, tagged env=test and tofu-estate=demo, and a westeurope storage account tagged env=test.

    CHANT_AZURE_TOKEN=dummy-token behold index azure --subscription 00000000-0000-0000-0000-0000000000d4 --endpoint http://127.0.0.1:14577 --store local:<dir>
    
    azure 00000000-0000-0000-0000-0000000000d4: 4 nodes (3 typed, 1 of unknown kind), 0 derived edges
    coverage: 1 (type, location) listed, 0 not observed
      note: no lexicon kind maps the listed type microsoft.resources/subscriptions/resourcegroups; its objects are kept as nodes of unknown kind, with the listing's properties masked
    behold index: wrote 20261116T192816Z-3c33e1695d98.json under cloud/azure/00000000-0000-0000-0000-0000000000d4/d8e70b04681a
    
    Field Result Example
    substrate there lexicon azure
    type there listedType microsoft.network/virtualnetworks (lowercase, as Resource Graph returns it), kind Microsoft.Network/virtualNetworks
    location there eastus, westeurope; the subnet has none in the listing and gets global
    cloud id there two provider-id entries per node, the ARM id as returned and its lowercased form
    tags there {"env":"test","tofu-estate":"demo"} on the VNet
    markers there on the VNet and the resource group {"owner":"demo","encoding":"escaped","source":"live"}
    properties there merged into attrs: addressSpace, subnets, accessTier, primaryEndpoints, sku, encryption
    observedAt there facts.observedAt and the stamp
    coverage there one * / * entry, listed

    The resource group is the one node with no lexicon kind. It is kept with unmappedKind: true and a note naming the type, which is what the issue's rule for a type with no lister asks for. The seed held no secret-bearing property, so masking was not exercised on Azure. The Kubernetes run covers it.

    E1: kubernetes on a scratch kind cluster

    k3d cluster create failed twice here before any node started (failed to ensure tools node: failed to retrieve cluster: No nodes found for given cluster, with and without the image volume). On this machine docker ps omits containers that the Docker API lists, which is the likely cause. I used kind instead. The node image is the pin in live/kind-node-image, kindest/node:v1.37.0, and the cluster is behold-ladybug-e1. kind wrote its kubeconfig to a scratch file only. The namespace behold-e1 holds a Deployment web labelled tofu-estate=demo and a Service web. It also holds a ConfigMap settings labelled env=test and tofu-estate=demo, and a Secret creds with a password and a token value.

    behold index kubernetes --kubeconfig <scratch>/kubeconfig --store local:<dir>
    
    kubernetes kind-behold-ladybug-e1: 322 nodes (322 typed, 0 of unknown kind), 358 derived edges
    coverage: 61 (type, location) listed, 0 not observed
      note: ... (55 notes)
    behold index: wrote 20261116T192944Z-1ac7403999b4.json under cloud/kubernetes/kind-behold-ladybug-e1/a274ec8a4bfa
    

    The run took 1.7 seconds. One of the 55 notes is default-types (types "*" left out v1/Event, events.k8s.io/v1/Event and coordination.k8s.io/v1/Lease). The other 54 are ambiguous-identity.

    Field Result Example
    substrate there lexicon k8s, scope kubernetes
    type there listedType apps/v1/Deployment, kind K8s::Apps::Deployment
    location there the namespace behold-e1, or cluster for cluster-scoped kinds
    cloud id there one k8s-uid, d67ca97d-99b1-4d06-aad8-dd3c6bc7005d for the Deployment
    labels there tags {"app":"web","app.kubernetes.io/name":"web","tofu-estate":"demo"}
    markers there on the Deployment, Service and ConfigMap (5 nodes in all) {"owner":"demo","encoding":"escaped","source":"live"}; the Secret has no marker label
    properties partly attrs holds metadata and spec (or data); there is no status block
    masking there Secret data is {"password":"[REDACTED]","token":"[REDACTED]"}, and neither seeded value occurs in the stored files
    observedAt there facts.observedAt and the stamp
    coverage there 61 entries, all listed

    The second thing wrong is the note volume. Fifty-four ambiguous-identity notes on a stock cluster bury the one note a reader wants. A node name matches both the v1/Node and the storage.k8s.io/v1/CSINode of that name, and a ClusterRole and ClusterRoleBinding pair named kindnet or system:kube-scheduler match each other the same way.

    A1: aws on floci

    The emulator is the digest in live/floci-image, on 127.0.0.1:14566, seeded with the aws CLI. The full run is on #1026.

    behold index aws --account 000000000000 --regions us-east-1 --endpoint http://127.0.0.1:14566 --store local:<dir>
    
    aws 000000000000: 17 nodes (17 typed, 0 of unknown kind), 11 derived edges
    coverage: 30 (type, location) listed, 0 not observed
    
    Field Result Example
    substrate there lexicon aws, stamp scope aws
    type there listedType and kind AWS::S3::Bucket
    location there us-east-1, or global for the IAM role
    cloud id there import-id ladybug-a1-data; the table carries its ARN
    tags empty a bucket tagged team=data before the read lists tags {}, since floci's ListResources returns no tags
    properties there, thin attrs is what floci returns: BucketName alone for a bucket, Path and RoleName for a role
    observedAt there facts.observedAt and the stamp
    coverage there 30 entries, all listed

    Without @intentius/chant-lexicon-aws beside behold, the same run keeps all 17 as nodes of unknown kind with no derived edges, and says so in a note.

    Verdict

    Each substrate lists against its emulator and the recorded output holds every field in the issue's list. Two properties are thinner than the issue says: GCP drops createTime and updateTime, and Kubernetes keeps no status. One rule is not met as written: the GCP disabled-API note does not print the gcloud services enable command on the CLI. The disabled-API path itself lists nothing and enables nothing.

    The version files sit under .scratch/listers/ in the behold-ladybug worktree. The stores are store-gcp, store-gcp-off, store-az and store-k8s. Commands and output are in logs/.

  11. lex00 commented on Nov 17, 2026

    @lex00
    ContributorAuthor

    The lister lives in chant as chant index (chant#4532), and behold index calls it. This issue closes with that pull request.

    The 2026-11-16 runs found two things in the chant lister. Both are fixed in the pull request for chant#4532.

    • The GCP disabled-API note stored its gcloud services enable command but the command line printed only the message. It now prints the command under the note, and --json keeps it in noteDetails.
    • Fifty-four ambiguous-identity notes on a stock kind cluster buried the useful one. A kind that repeats more than three times now prints as one line with a count and an example. The stored version and --json keep every note. Identity matching is not changed here; chant#5250 makes it kind-aware.

    Done-when 1, red first. I added "cloudcontrol:CreateResource" to READ_OPERATIONS.aws and ran npx vitest run packages/core/src/cloud-lister/guard.test.ts. It failed like this:

    FAIL the read allowlist > is exactly the five read operations   (received "cloudcontrol:CreateResource")
    FAIL the read allowlist > names no write
    FAIL the guard refuses every mutating call > aws CreateResource  (expected function to throw an error, but it didn't)
    Tests  3 failed | 34 passed (37)
    

    Then I changed the GCP lister's call to method: "PUT", which failed like this:

    FAIL every call a lister makes is on the allowlist > gcp
    FAIL every call a lister makes is on the allowlist > and nothing else
    FAIL the lister sources > send only GET and POST   (gcp.ts: not to match /method:\s*"(PUT|PATCH|DELETE)"/)
    Tests  3 failed | 34 passed (37)
    

    Both plants are reverted and not committed. After the revert it passes:

    Test Files  1 passed (1)
    Tests  37 passed (37)
    

    AWS on floci, from the chant build. A scratch floci (ladybug-4532-floci, port 14532, dummy credentials) seeded with the aws CLI. It holds a VPC with a subnet and a security group, a bucket and a role.

    chant index aws --endpoint http://127.0.0.1:14532 --account 000000000000 --regions us-east-1 --types AWS::EC2::VPC,AWS::EC2::Subnet,AWS::EC2::SecurityGroup,AWS::S3::Bucket,AWS::IAM::Role
    
    aws 000000000000: 11 nodes (11 typed, 0 of unknown kind), 7 derived edges
    coverage: 5 (type, location) listed, 0 not observed
    chant index: wrote 20261117T042425Z-45dc93953b68.json under cloud/aws/000000000000/dc89c2ad5774 in <XDG_DATA_HOME>/chant
    

    The stored version is <XDG_DATA_HOME>/chant/index/cloud/aws/000000000000/dc89c2ad5774/20261117T042425Z-45dc93953b68.json, next to its scope.json.

  12. lex00 commented on Nov 17, 2026

    @lex00
    ContributorAuthor

    This closes with chant#5273, which closed chant#4532. The lister is chant's chant index, and behold index calls it. The runs above met each done-when item on every substrate, and chant#5273 fixed the two things they found. A disabled-API note now prints its command, and repeated notes fold into one line.

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

    epic:graph-querywave:1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions