协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
flexport-ci-integration【开发与工程】Gate Flexport integrations in CI with credential-free contract tests and an optional protected read-only smoke lane. Use when adding REST, MCP, webhook, version, or mutation safety checks. Trigger with: "test Flexport in CI", "Flexport contract tests", "secure Flexport CI".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: flexport-ci-integration description: >- Gate Flexport integrations in CI with credential-free contract tests and an optional protected read-only smoke lane. Use when adding REST, MCP, webhook, version, or mutation safety checks. Trigger with: "test Flexport in CI", "Flexport contract tests", "secure Flexport CI". allowed-tools: Read, Grep, Write, Edit version: 2.0.0 argument-hint: '[repository-and-surfaces]' model: inherit effort: high license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
The required CI lane must run without Flexport secrets and remain safe for forks. Live verification belongs in a protected, non-fork, read-only lane with explicit environment approval.
Validate schemas, tolerant additive fields, pagination, error classification, webhook raw-body signatures, and mutation guards entirely from fixtures.
Assert default tests cannot resolve Flexport credentials or reach live mutation adapters.
Never expose repository/environment secrets to untrusted pull-request code; keep required fork checks credential-free.
Run only from trusted refs after environment approval, inject a scoped credential, and permit one documented read-only proof.
Enforce an adapter-level CI policy that rejects booking, document, invoice, or purchase-order writes even when a credential exists.
Attach test counts, fixture/source dates, release SHA, and redacted live outcome; never upload tokens or provider payloads.
REST calls authenticate with a cached OAuth 2.0 client-credentials Bearer token using audience https://api.flexport.com, or an explicitly accepted broad API key. Use distinct credentials per workload and never log credentials or tokens. MCP calls use the authenticated connection to https://mcp.flexport.com/mcp and remain subject to each tool's documented account permissions.
Use Read and Grep for discovery and evidence. Use Write or Edit only for the approved artifact, code, configuration, test, or receipt described by this workflow; do not make an unapproved Flexport-side change.
Return a machine-reviewable receipt in this shape; adapt the operation values, but never place credentials or provider payloads in it:
surface: rest-v3
operation: shipment-read
decision: approved
outcome: verified
evidence:
release_sha: recorded-out-of-band
provider_reference: redacted
rollback_owner: logistics-platform
Every pull request tests v3 shipment envelopes, MCP cursor handling, malformed webhook signatures, and ambiguous booking guards. A protected main-branch job may perform one shipment list read with a test credential.
| Failure | Response |
|---|---|
| Fork can read a secret | Disable the lane and repair event/environment permissions immediately. |
| Fixture contains production data | Replace and purge it before rerunning. |
| Live job can mutate | Fail the policy gate and remove write-capable paths. |
| Schema drift appears | Update from current first-party docs and add a regression fixture. |