Add AGENTS.md file#1319
Conversation
Refers to CLOUDDST-32523 Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Reviewer's GuideAdds an AGENTS.md architecture/usage guide for the IIB service and introduces a GitHub Actions check to enforce that the file stays within 60 lines. Sequence diagram for IIB build request lifecycle from AGENTS.mdsequenceDiagram
actor User
participant IIB_API
participant Postgres
participant RabbitMQ
participant Worker
participant Quay
participant ImageStream
participant GitRepo
participant KonfluxPipeline
participant S3
participant LocalFS
User->>IIB_API: POST /builds/<type>
IIB_API->>Postgres: Insert Request row
IIB_API->>RabbitMQ: Enqueue Celery task
IIB_API-->>User: 202 Accepted with Request id
RabbitMQ-->>Worker: Deliver task
Worker->>IIB_API: Update Request state via api_utils
Worker->>ImageStream: Check cached index.db digest
alt cache_miss_or_digest_changed
Worker->>Quay: Pull index.db via ORAS
Worker->>ImageStream: Store index.db at /var/index_db
end
Worker->>GitRepo: Commit FBC config changes
Worker->>KonfluxPipeline: Trigger build pipeline
Worker->>KonfluxPipeline: wait_for_pipeline_completion
alt pipeline_success
Worker->>Quay: Optional push updated index.db (overwrite_from_index_token)
Worker->>IIB_API: Mark Request complete
else pipeline_or_push_failure
Worker->>GitRepo: Revert commit
Worker->>IIB_API: Mark Request failed
end
Worker->>LocalFS: Write request log file
Worker->>S3: Upload log if configured
Flow diagram for AGENTS.md line count GitHub Actionflowchart TD
PR[Pull_request opened or updated] --> CheckPaths{AGENTS.md modified?}
CheckPaths -- No --> End[Skip workflow]
CheckPaths -- Yes --> Job[check-line-count job]
Job --> Checkout[Step: actions/checkout@v6]
Checkout --> CountLines[Step: shell script wc -l AGENTS.md]
CountLines --> Decision{line_count <= 60?}
Decision -- Yes --> Pass[Job succeeds]
Decision -- No --> Fail[Job fails with error]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Review Summary by QodoAdd AGENTS.md documentation and CI validation workflow
WalkthroughsDescription• Add comprehensive AGENTS.md documentation for IIB project • Document architecture, build process, testing, and design choices • Add CI workflow to enforce 60-line limit on AGENTS.md file Diagramflowchart LR
A["New AGENTS.md<br/>Documentation"] -->|"Describes"| B["IIB Architecture<br/>& Components"]
A -->|"Guides"| C["Build, Test,<br/>& Deployment"]
A -->|"Highlights"| D["Design Choices<br/>& Pitfalls"]
E["CI Workflow<br/>check_agents_md.yml"] -->|"Validates"| A
E -->|"Enforces"| F["60-line Limit"]
File Changes1. AGENTS.md
|
Code Review by Qodo
1. Check bypassed on push
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The workflow references
actions/checkout@v6, but the latest published major version isv4; update this to a valid, pinned major (e.g.actions/checkout@v4) to avoid workflow failures.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The workflow references `actions/checkout@v6`, but the latest published major version is `v4`; update this to a valid, pinned major (e.g. `actions/checkout@v4`) to avoid workflow failures.
## Individual Comments
### Comment 1
<location path=".github/workflows/check_agents_md.yml" line_range="13" />
<code_context>
+ check-line-count:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - name: Verify AGENTS.md is at most 60 lines
+ run: |
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Pin the checkout action to a specific commit SHA for better supply-chain security.
Using a floating tag like `@v6` means the workflow will automatically pull future changes to `actions/checkout`, which is a supply-chain risk. Please pin to a specific commit SHA (optionally with a comment indicating the version) to keep builds deterministic and harden security.
```suggestion
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu> Assisted-by: Cursor Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
804330c to
d3771ac
Compare
Refers to CLOUDDST-32523
Summary by Sourcery
Add a concise AGENTS.md guide describing the IIB service architecture, workflows, and pitfalls, and enforce a CI check that limits the file to 60 lines.
CI:
Documentation: