Skip to content

docs(skills): a sibling's wiring comes from the design, not from a comment - #633

Closed
xlight05 wants to merge 1 commit into
wso2:mainfrom
xlight05:fix/sibling-wiring-comes-from-the-design
Closed

docs(skills): a sibling's wiring comes from the design, not from a comment#633
xlight05 wants to merge 1 commit into
wso2:mainfrom
xlight05:fix/sibling-wiring-comes-from-the-design

Conversation

@xlight05

Copy link
Copy Markdown
Contributor

The problem

employees-submit-expense131 shipped this in expense-webapp/workload.yaml:

dependencies:
  endpoints:
    - component: expense-api          # ← the friendly name

OpenChoreo resolves an endpoint dependency by the scoped name, so this matched no
binding. The release rendered, the pod ran, the app served — and the only symptom was a
ReleaseBinding parked at Ready=False / ConnectionsPending, with the project reporting
"deploying" for ever. The wiring-conformance check caught it and minted
issue #6, which
cost a whole coding cycle (#6#7 → PR #8) to change one string.

The correct value was already in the agent's own tree, byte-exact, committed by the
platform before the agent ever ran:

// specs/design/components/expense-webapp/design.json
"wiring": { "endpoint": { "component": "employees-submit-expense131-expense-api",  } }

Root cause: doc drift against a fix that already landed

183e67a8 (2026-08-01) moved a component dependency's endpoint wiring off the live
endpoint catalog and into design.json — precisely because the catalog only lists
components that have already deployed, so on a first delivery it answers nothing.
Its own commit message names this exact failure.

The agent-facing docs were never moved with it:

Where Said Actually
workload-and-wiring.md kind table component"not derivable from specs/ — the skill body" derived, and stamped into design.json since 2026-08-01
SKILL.mdThe endpoints: half read the "Platform-resolved dependencies" comment that comment carries org-service only
ADR-0013 "a sibling's endpoint name comes from a workload.yaml nobody has written yet" written one day before 183e67a8 superseded it

So the agent read the table, went looking for a comment, found none — no
"Platform-resolved dependencies" comment exists on any issue in that repo
, I checked
all of them — and fell back to the only name it had ever seen.

The instruction that was supposed to save it (# the platform's name — never "correct" it, in the template) never fired, because the agent had already been told the value
was not in specs/.

The change

Move the docs to where the data is.

references/workload-and-wiring.md

  • The kind table routes component to its wiring object, like the other two derived
    kinds.

  • A new shape table maps the two wiring variants onto the two halves of
    dependencies: — an endpoint object → endpoints[], ref + envBindings
    resources[] — so which half is read off the data rather than off the kind.

  • Copy-verbatim now covers both variants, and the project prefix is stated as the
    platform's own name for the component, with the silent failure spelled out:

    A wiring.endpoint's component carries the project as a prefix
    <project>-<component>. It deliberately does not match the name the rest of the
    tree calls that component […] Any other spelling parses, builds, deploys and serves
    with the address env var silently absent.

SKILL.md — the endpoints: half resolves a sibling from design.json, and keeps
the comment for org-service alone. It closes the hole the agent actually fell into:

A sibling (kind: component) is already resolved in your own tree […] That
holds whether or not the comment below exists.

ADR-0013 — restated at its current state: component sits on the derived side,
and the conformance net checks endpoint targets as well as refs.

overlays/local.md — the anchor moves in lockstep.

Gates

  • runners/remote-worker398/398 pass, on this branch's base. These render
    SKILL.md through local.md, and skill_overlay throws on a stale anchor
    (replace-text matched 0 times), so the overlay edit is proven, not assumed.
  • make license-check — exit 0.

Not in this PR

The structural fix. dependencies: in workload.yaml is 100% platform-derived
ScopedComponentName, the sibling's own endpoint name, visibility: project,
ServiceURLEnvName. Asking a model to transcribe a value the platform calculated is a
variance source that no wording removes, and the friendly name is the natural thing to
write, so the wording is fighting the grain.

checkWiringConformance already holds, at the same moment and in the same process, the
shipped file, the declared truth, and the exact missing values — and it writes an
issue. It could write the file: reconcile dependencies: from design.json, commit,
then build off that commit. No PR, no cycle, no model. The precedent exists —
DerivePlatformResourceFactsAtHead already commits to main outside a PR at the same
pre-tag step.

That is a separate change. This one stops the bleeding for the next project.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JvanuzxvZmpfvnh2Pbr2wD

…mment

`183e67a8` moved a `component` dependency's endpoint wiring off the live
endpoint catalog and into `design.json`, precisely because the catalog only
lists components that have already DEPLOYED — so on a first delivery it
answers nothing. The agent-facing docs were never moved with it.

`workload-and-wiring.md` still told the agent a `component` dependency's
wiring is "not derivable from `specs/`", and the skill body still routed it
to the "Platform-resolved dependencies" comment. On a project whose only
endpoint dependency is a sibling, no such comment is posted, so the agent
read the table, found no comment, and invented the value — writing the
FRIENDLY component name where OpenChoreo resolves by the SCOPED one.

That is not hypothetical: `employees-submit-expense131` shipped
`component: expense-api` with `employees-submit-expense131-expense-api`
sitting in its own `design.json` under `wiring.endpoint`. The release
rendered, the pod ran, the app served, and the sole symptom was a
ReleaseBinding parked at `Ready=False / ConnectionsPending` with the project
reporting "deploying" for ever. The conformance check caught it and minted
issue wso2#6 — which cost a whole coding cycle to transcribe one string the
platform had already computed.

Move the docs to where the data actually is:

- the kind table routes `component` to its `wiring` object, like the other
  two derived kinds, and a shape table maps the two `wiring` variants onto
  the two halves of `dependencies:`;
- the copy-verbatim rule covers both variants, and names the project prefix
  as the platform's own name rather than something to "correct";
- the skill body's `endpoints:` half resolves a sibling from `design.json`
  and keeps the comment for `org-service` alone — which is all it carries
  that a design cannot;
- ADR-0013 is restated at its current state: `component` is on the derived
  side, and the conformance net checks endpoint targets as well as refs.

The local overlay's anchor moves in lockstep (`skill_overlay` fails loudly
on a stale anchor, and the 398 remote-worker tests render both variants).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JvanuzxvZmpfvnh2Pbr2wD
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 35 minutes.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de4532c5-5cf2-45b2-8df5-9992cb8faa76

📥 Commits

Reviewing files that changed from the base of the PR and between 3a90503 and 5da1c65.

📒 Files selected for processing (4)
  • docs/decisions/ADR-0013-derived-wiring-lives-in-the-design.md
  • skills/aep/SKILL.md
  • skills/aep/overlays/local.md
  • skills/aep/references/workload-and-wiring.md

Comment @coderabbitai help to get the list of available commands.

@xlight05

Copy link
Copy Markdown
Contributor Author

Folded into #632 (commit c52baa80, cherry-picked unchanged) — #632 now carries all four commits and matches what is deployed on the local plane exactly.

Leaving this open rather than closing it myself, since the review threads here are still readable context. Close it as superseded whenever suits; nothing is lost.

@xlight05

Copy link
Copy Markdown
Contributor Author

Superseded by #632, which now carries this commit as c52baa80 (cherry-picked unchanged) alongside the gateway-routing work and the review fixes. The two changes are the same class of defect in the same files, so they review better together than apart.

Closing rather than merging. Nothing is lost: #632's description carries the full root-cause writeup from here, and the change is already live on the local plane (org skill library md5-matches the built commit; pending skill updates count: 0).

@xlight05 xlight05 closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant