-
Notifications
You must be signed in to change notification settings - Fork 0
CXF-221: agent skills for post-sync verification, update/rollback, and failure diagnosis #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4682dbb
CXF-221: verify / update-rollback / diagnose skills (PR 6)
btipling bf27e9f
CXF-221: review fixes — correct rollback provenance, harden polling a…
btipling f8dcfb1
CXF-221: bound the verify RUNNING poll, handle DISABLED, lock new saf…
btipling 3ff5697
CXF-221: rewrap step 6 so the evidence-unsatisfied literal is contiguous
btipling af466a0
CXF-221: DISABLED is not unconditionally normal; lock the poll bounds
btipling bf3d4f2
CXF-221: key the DISABLED handling off sync_disabled_category; lock r…
btipling 067ae19
CXF-221: key the DISABLED discriminator on sync_disabled_reason (popu…
btipling 2078480
CXF-221: empty-reason fallback, scope the activation anti-pattern, ro…
btipling d5024a1
CXF-221: preserve the locked literal, scope via prose; blocker-protoc…
btipling 1e09561
CXF-221: bound the force-sync verification poll in update-and-rollback
btipling 7452913
CXF-221: terminal-state branches in the force-sync verification poll
btipling e8a793c
CXF-221: terminal-status poll exit, DISABLED literal, diagnose frontm…
btipling 79117b7
CXF-221: include DISABLED in the verify RUNNING-poll exit condition
btipling 14d811d
CXF-221: correct the skills README intro — five funnel + two pre-1 sk…
btipling 1e3c695
CXF-221: address bot review suggestions on the three new skills
btipling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,15 @@ | ||
| { | ||
| "version": "0.3.0", | ||
| "version": "0.4.0", | ||
| "skills": [ | ||
| {"name": "author-in-app-connector", "version": "0.2.1", "path": "../../skills/author-in-app-connector/SKILL.md"}, | ||
| {"name": "read-authoring-contract", "version": "0.2.0", "path": "../../skills/read-authoring-contract/SKILL.md"}, | ||
| {"name": "write-connector-source", "version": "0.2.0", "path": "../../skills/write-connector-source/SKILL.md"}, | ||
| {"name": "build-and-test", "version": "0.2.0", "path": "../../skills/build-and-test/SKILL.md"}, | ||
| {"name": "deploy-and-activate", "version": "0.2.0", "path": "../../skills/deploy-and-activate/SKILL.md"}, | ||
| {"name": "design-access-model", "version": "0.1.0", "path": "../../skills/design-access-model/SKILL.md"}, | ||
| {"name": "source-openapi-spec", "version": "0.1.0", "path": "../../skills/source-openapi-spec/SKILL.md"} | ||
| {"name": "source-openapi-spec", "version": "0.1.0", "path": "../../skills/source-openapi-spec/SKILL.md"}, | ||
| {"name": "verify-connector-output", "version": "0.1.0", "path": "../../skills/verify-connector-output/SKILL.md"}, | ||
| {"name": "update-and-rollback", "version": "0.1.0", "path": "../../skills/update-and-rollback/SKILL.md"}, | ||
| {"name": "diagnose-authoring-failure", "version": "0.1.0", "path": "../../skills/diagnose-authoring-failure/SKILL.md"} | ||
| ] | ||
| } | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| name: diagnose-authoring-failure | ||
| description: Use when a build, draft test, activation, or production sync fails and you need the symptom-to-cause-to-fix route. Do not use when the connector is healthy and you are verifying sync output - use verify-connector-output; do not use when updating or rolling back a healthy live connector - use update-and-rollback. | ||
| version: 0.1.0 | ||
| --- | ||
|
|
||
| # diagnose-authoring-failure | ||
|
|
||
| Symptom -> cause -> fix router for authored-connector failures. Built on the | ||
| lifecycle doc's common-failures table, the draft-test evidence reading, and | ||
| where logs live. Ports the taxonomy approach of baton-admin | ||
| `diagnose-connector-failure`; the baton-admin skill's repo-local CLI | ||
| tooling is replaced by the tenant MCP tools named below. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Start from the symptom: the exact error text, the failing step (build, | ||
| draft test, activation, production sync), and the IDs at hand. | ||
| 2. Route the symptom through the table below; collect the smallest evidence | ||
| needed for that cause. | ||
| 3. Apply the fix, then re-run the smallest verification step that failed. | ||
| 4. Output a chat diagnostic summary: failure summary, classified cause, | ||
| evidence used, likely owner (source, schema, runtime, credentials, or | ||
| platform), one concrete next fix, and the smallest verification command. | ||
|
|
||
| ## Symptom -> cause -> fix | ||
|
|
||
| | Symptom | Cause / fix | | ||
| |---------|-------------| | ||
| | Build rejected: `connector source exceeds the 262144 byte compile limit` | The esbuild-bundled source is over 256 KiB. Trim the source set; large OpenAPI-derived spec assets are the usual weight. | | ||
| | Build rejected: `connector bundle with embedded runtime specs is <N> bytes, above the 1048576 byte limit` | The bundled `connector.js` plus its embedded runtime specs is over 1 MiB - a separate cap from the 256 KiB source limit, hit after bundling. Trim the source or the generated spec assets it embeds. | | ||
| | Build rejected: `credential-class config field must be marked is_secret` | A token/secret/password-named field in `runtime-schema.json` lacks `is_secret: true`. The `secret:` spelling is not read. | | ||
| | Draft test: `credential re-entry required: <fields>` | Configure the instance credentials before the draft test. | | ||
| | Draft test: `connector config field X is missing type` | Add `"type": "string"` (etc.) to the field in `runtime.config_schema`. | | ||
| | Sync error mentions an `unregistered transport` | A `node` or `reuse` references a transport missing from `connector({ transports: ... })`. Register that same transport object, rebuild, and retest. | | ||
| | Draft test: `ticketing.enabled must be true when ticketing is configured` | The runtime-schema carries a `ticketing` block the connector code does not back. Remove the block (and any `actions` / `policy_surface` entries referencing dropped code); `enabled: false` is not a valid off-switch. | | ||
| | Activation reports `activation evidence is unsatisfied` | No PASS test-sync evidence binds this revision. Run the draft test (with credentials set) and confirm it passed before asking the OWNER to review a fresh approval URL. | | ||
| | Production sync `Invalid token provided` | The API token is wrong or truncated. Re-configure with the full token, then re-run. | | ||
|
|
||
| ## Draft-test FAIL reading | ||
|
|
||
| The evidence row is authoritative: poll | ||
| `c1_connector_authoring_get_test_run_evidence` and read the `result` (PASS | ||
| or FAIL) and the `error` field. Poll with backoff (e.g. every 5-10s); if no | ||
| row after ~10 polls, stop and report `NotFound`/pending. The FAIL reason | ||
| lives on the evidence row; it is not always logged when the read activity | ||
| succeeds but the outcome evaluation returns FAIL. PASS requires all of: | ||
|
|
||
| - `ConnectionOK` - Validate succeeded | ||
| - `HostCallOK` - GetMetadata succeeded | ||
| - No read error and no write attempt | ||
| - The config version handle matches the candidate revision | ||
| - The runtime image digest matches the revision-pinned image | ||
|
|
||
| A FAIL row (or no row yet) means activation stays `evidence is unsatisfied` | ||
| until a new draft test writes PASS. | ||
|
|
||
| ## Where logs live | ||
|
|
||
| Use the product's connector activity and sync logs - the same surface you | ||
| use to view any connector in your tenant. There is no separate | ||
| operator-only log surface. The connector's status row | ||
| (`c1_connector_service_get` -> `status.status`, `status.lastError`) is the | ||
| authoritative outcome for a sync. | ||
|
|
||
| ## Exit criteria | ||
|
|
||
| - Every one of the nine common-failures rows routes to its documented fix. | ||
| - A draft-test FAIL is read from the evidence row, not from completion. | ||
| - The logs location and the status row are named. | ||
| - The body contains the literals `262144 byte compile limit`, | ||
| `1048576 byte limit`, `is_secret`, `credential re-entry required`, | ||
| `missing type`, `unregistered transport`, | ||
| `ticketing.enabled must be true when ticketing is configured`, | ||
| `activation evidence is unsatisfied`, `Invalid token provided`, | ||
| `ConnectionOK`, `HostCallOK`, `c1_connector_service_get`, and | ||
| `status.lastError`. | ||
|
|
||
| ## Anti-patterns | ||
|
|
||
| - Do not start with broad full-suite runs when a small probe can isolate | ||
| the issue. | ||
| - Do not hide unresolved drift with waivers or mock shaping. | ||
| - Do not expose auth material, tokens, or customer data in diagnostics. | ||
| - Do not guess a fix without reading the evidence row first. | ||
|
|
||
| ## Blocker protocol | ||
|
|
||
| If the same validation or runtime error remains unchanged after 2 failed | ||
| fix cycles on the same error, stop and report the exact error text instead | ||
| of guessing further. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Sources - diagnose-authoring-failure | ||
|
|
||
| Authored against the pinned sources below (decision 5: nothing written from | ||
| model memory). Source-of-truth precedence: (a) MCP-served guide, (b) | ||
| `authoring.proto`, (c) lifecycle doc, (e) baton-admin | ||
| `diagnose-connector-failure`. | ||
|
|
||
| | Source | Pin / SHA | What this skill quotes | | ||
| |---|---|---| | ||
| | MCP-served guide | c1 `2e5f53eb441a93087d9754085ca17a5061e125ea` | The Caps table (262144-byte compile limit, 1048576-byte bundle limit) and the Evidence and credentials contract (`credential re-entry required`; activation fails closed until a PASS evidence row binds the revision digests). | | ||
| | Authoring proto | c1 `2e5f53eb441a93087d9754085ca17a5061e125ea` | `GetTestRunEvidence` (poll `(catalog_id, revision_id, test_run_id)`; `result` PASS/FAIL + `error` on the evidence row). | | ||
| | Lifecycle doc | c1 `2e5f53eb441a93087d9754085ca17a5061e125ea` | The Debugging section: the common-failures table (all nine rows), the draft-test FAIL reading (evidence row authoritative; PASS requires `ConnectionOK`, `HostCallOK`, no read error and no write attempt, config version handle match, runtime image digest match), and where logs live (product connector activity and sync logs; the status row `c1_connector_service_get` -> `status.status`, `status.lastError`). | | ||
| | baton-admin `diagnose-connector-failure` | `6fe6886f607ed0d2e48a616c30e7ce4bffc32489` | The taxonomy approach: start from the symptom, classify the failure surface, collect the smallest evidence, keep the diagnosis focused on symptom/evidence/owner/next-fix/rerun-target, and the output contract (failure summary, classified surface, evidence used, likely owner, one concrete next fix, smallest verification command). | |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.