forked from Skull-boy/agent-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontract.yaml
More file actions
46 lines (36 loc) · 1.65 KB
/
Copy pathcontract.yaml
File metadata and controls
46 lines (36 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: 1
workflow: duplicate-issue-detector
framework: langgraph
inputs:
- GitHub issue number (passed at invocation time)
- Issue title + body fetched from GitHub API at runtime
outputs:
- One comment on the triggering issue, only if similarity >= threshold
permissions:
- github: issues:read+write # comment only — never close, label, or edit
- openai: embeddings:read
- qdrant: read+write on one collection
side_effects:
- Posts one comment on the triggering issue, if similarity >= threshold
- Writes one vector to the Qdrant collection (always, regardless of duplicate result)
approval_points: [] # intentionally empty — this workflow only ever comments,
# never closes or merges, so no approval gate is required
recovery_strategy: >
Any failure (GitHub unreachable, OpenAI error, Qdrant error) raises an
exception that propagates to the caller. Nothing is silently skipped.
The run fails loudly and visibly.
replay_semantics: >
Idempotent on Qdrant — re-running on the same issue number overwrites
the existing vector (issue number is the Qdrant point ID).
The GitHub comment is NOT idempotent — running twice on the same issue
will post two comments if a duplicate is found both times.
dependencies:
- GitHub API
- OpenAI Embeddings API (text-embedding-3-small)
- Qdrant instance (local or cloud)
state: >
Persisted in a Qdrant collection — one 1536-dimensional vector per
previously-seen issue, with issue number, title, and URL as payload.
observability:
- Structured INFO/ERROR logs to stderr during execution
- JSON summary to stdout on completion (issue number, scores, flags, run_log)