Skip to content

lifecycle: research — event-driven reconciliation, cross-substrate auth reporting, PR-diff enforcement, air-gap + secrets-in-git #1863

Closed

Description

@lex00

Five self-contained research questions about where chant's current model has real edges. Filed together because they share a theme — each is a place where the model's honest scope, not a bug, is worth stating explicitly and testing against alternatives — not because they're one deliverable.

1. Event-driven reconciliation where a substrate supports it

WatchOp detects drift on a Temporal-scheduled interval — chant lifecycle diff --live on a cron. That is polling, and its detection latency is bounded by the interval, not by when the change happened.

Some substrates expose native change-notification primitives (event/audit-log streams, asset-inventory feeds) that could in principle be subscribed to instead of polled, narrowing detection latency to near-real-time for the resources those primitives cover.

Research: survey which lexicons' substrates have a native, trustworthy change-notification primitive; whether the coverage is complete enough to replace (not just supplement) a scheduled WatchOp for that lexicon; and what the operational cost/trust trade-off looks like against the existing poll. Output should be a per-lexicon verdict, not a single yes/no.

2. Reporting authorization across a multi-substrate project as one surface

Each lexicon's apply/observe authority is answered by that substrate's own native permission system — separate identity models per lexicon by design, and that separation is deliberate (chant does not invent a proprietary permission layer).

A project spanning several lexicons still has no single place to ask "what can touch what, across everything this project declares" — that question today means checking each substrate's own tooling separately.

Research: what a read-only, cross-substrate authorization report would need — not a new permission model, just a projection that answers "who can act on what" across lexicons in one place. Scope explicitly excludes anything that would centralize or intermediate the actual permission checks themselves.

3. Forcing the compiled diff in front of a reviewer, not just making it available

chant lifecycle plan exists and can be run by hand. Nothing today puts its output automatically in front of a PR reviewer — it depends on someone remembering to run it and paste the result.

Research: what a built-in "post the rendered plan as a PR comment" integration would look like per CI provider (GitHub Actions first), whether it should default on for any change touching a lexicon with an apply target, and whether opt-out (rather than opt-in) is the right default given how easy the manual step is to skip.

4. Air-gapped / offline deployability, audited rather than assumed

No lexicon or the core Ops/Temporal path has been audited end-to-end for hidden network dependencies (registry pulls, provider metadata fetches, telemetry) that would break in a no-egress environment.

Research: an audit pass per lexicon and the core build/apply/Ops path, cataloguing every network dependency, followed by a decision on whether a first-class air-gapped story belongs in core or stays an integration pattern documented per-adopter.

5. Whether an opinionated encrypted-secrets-in-git pattern belongs in chant at all

Secrets today are entirely deferred to each substrate's own secret store (Secrets Manager, Key Vault, etc.), reached through the relevant lexicon. There is no chant-native pattern for a secret committed alongside typed source in encrypted form.

Research: survey existing encrypted-secret-in-git patterns, and make an explicit scope call — does this belong in core, as an opt-in lexicon, or stay permanently out of scope with a documented recommended pairing instead. A deliberate "no" is an acceptable outcome of this research item; an undecided default is not.


Each item above should land as its own scoped issue once triaged — this one stays open only to hold the set together until that split happens.

Activity

  1. added
    needs-review
    area:lifecycle
    area:ops
    design
    on Aug 24, 2026
  2. lex00 commented on Aug 29, 2026

    @lex00
    ContributorAuthor

    Researched against the current tree. Verdicts below, one issue per thread that survived.

    1. Event-driven reconciliation — pursue, narrowed. #1981

    The per-lexicon survey has one family passing. Kubernetes has a complete watch stream that needs nothing deployed into the observed cluster, and k3d, k3s and helm all reach a cluster through it. Docker has docker events for the local daemon. Every cloud substrate fails on the same point. Subscribing to EventBridge, an Asset Inventory feed or an Event Grid system topic means writing infrastructure into the account being watched, which inverts the property that makes a watch safe to point at production, and coverage on those feeds is per-service and delayed. Forge webhooks are complete but need an ingress endpoint chant does not run. The shippable part is a signal seam consumed only by chant operator, whose loop already sleeps on an AbortSignal and whose ticks are level-triggered, so an early wake cannot change what a tick concludes. The signal carries no payload and never reaches a change set. This does not unpark #202, which is about spending a fixed poll budget across many stacks rather than about what triggers a tick.

    2. Cross-substrate authorization reporting — decline as asked, pursue a substitute. #1982

    The estate-wide report is partial in the direction that matters. A projection built from what the project declares misses a role attached in the console, an SSO group and an org-level token, which is exactly the set nobody declared and exactly the set the question is asked about. A report that looks complete while missing those is worse than none. Org-level identity reconciliation is also already warden territory, and the governance cycles that would carry it are parked at #465–#482. What chant knows completely is one actor, itself. Every native observer already resolves an identity and a scope inside ObserverAdapter.bind() and throws both away, and the only way that answer surfaces today is as a no-credentials failure or as a successful read against the wrong account. chant lifecycle whoami <env> reports it before anything acts.

    3. PR-diff enforcement — pursue. #1983

    Both halves already exist and nothing joins them. GitLab has gitlabMrReport and the MrPlanReport composite. GitHub has the sticky-comment mechanism, proven in examples/github-pr-preview with a hidden marker and gh api, and no plan report to put in it. Missing are a markdown projection of the change set and a composite that emits the job, and forgejo inherits the composite from github. On the default question, chant does not own the reviewer's workflow, so there is no global switch to turn on. The default belongs in the composite, which posts unless told otherwise, and the manual step stops being skippable because it stops being manual.

    4. Air-gap audit — pursue as a test, not as prose. #1984

    The audit came back better than the thread assumed. No telemetry exists anywhere. Every lexicon's spec fetch is reached only from codegen, caches to disk and falls back to a committed snapshot. Network-free is already the default where a network backend exists, noopReferrerLookup being the stated case. The only api.github.com callers are the freshness script and chant dev pinned-upgrade, both maintenance-only. None of that is guaranteed and nothing tests it, and a prose audit answers the question once then rots on the next PR that adds a fetch. So the deliverable is a guard test over the offline phases plus a catalogue page. The recorded decision is that a first-class air-gapped mode stays out of core, because the network chant needs at apply time is the substrate itself and every other severable piece already has a per-surface answer.

    5. Encrypted secrets in git — decline, already decided.

    This was answered before the thread was filed. committed-encrypted is the fourth SecretProvenance member, the declaration records a repo-relative path and never bytes so the factory still folds under --sandbox, the ciphertext is emitted as a sidecar and never as a document in the primary output, and WK8504 and WK8505 check it. docs/design/committed-encrypted-sops-provenance.md carries the reasoning and the implementation deltas. The scope call the thread asked for reads as opt-in core primitive, sops only, delivery-system decryption. Remaining follow-ups are tracked outside this repo. One stale sentence in architecture/core-type-system.mdx still says the fourth origin has no primitive, filed as #1985.


    Four issues filed, the set is split, and this can close once the needs-review label comes off.

  3. removed
    needs-review
    on Aug 29, 2026
  4. lex00 commented on Aug 29, 2026

    @lex00
    ContributorAuthor

    Split complete. Three threads have implementation issues (#1981 event-driven reconciliation via a k8s/docker watch seam, #1983 PR-diff enforcement, #1984 air-gap guard test), one has a substituted slice (#1982 lifecycle whoami), and the secrets-in-git thread was already decided and shipped as committed-encrypted provenance. Closing per this issue's own terms — it existed to hold the set together until the split.

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

    area:lifecyclearea:opsdesign

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions