Auto-generated Pull Request for fix/list-plasmids-expression#611
Conversation
The project-specific coding guidelines are being removed from the repository to avoid duplication or potential drift from standard Go practices and to simplify the documentation maintenance.
- Replace cascading state structs with tuple-based pipeline - Streamline filter build process - Add validation for plasmid list filters (id, in_stock) 💘 Generated with Crush Assisted-by: Google: Gemini 3.1 Flash Lite Preview via Crush <crush@charm.land>
- Include testing instructions with gotestsum - Include linting and formatting commands using golangci-lint 💘 Generated with Crush Assisted-by: Google: Gemini 3.1 Flash Lite Preview via Crush <crush@charm.land>
Move the plasmid type validation and state building logic out of the buildListPlasmidFilterQuery pipeline into validateAndBuildPlasmidFilter. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
Update limit, cursor, and total fields in plasmidResultContext to use domain-specific types for better alignment with the resolver pipeline. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…nPair 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…ationPair 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…a filterValidationPair 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…-free validation chain 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…er chain 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…ipeline - Refactor ListPlasmids resolver into a point-free IOEither chain. - Simplify buildListPlasmidFilterQuery validation chain. - Add pipeline helpers for error and result folding. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
Convert plasmid ID nil check into an Either validator and chain it within the buildListPlasmidFilterQuery pipeline for better consistency. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
…e function - Move validateAndBuildPlasmidFilter out of the var block - Simplify plasmid type filter query to use direct tag matching 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 2 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation updated by replacing CLAUDE.md with AGENTS.md (developer workflows). The plasmid list resolver pipeline refactored from tuple/context enrichment to multi-stage Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
AGENTS.md (1)
17-17: Path argument./...may be redundant.The lint command includes
./...path argument, while the previous documentation specifiedgolangci-lint runwithout an explicit path. Thegolangci-lint runcommand recursively checks the current directory by default, so the./...argument is typically redundant unless you need to be explicit.Based on learnings, the established command was:
golangci-lint run🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` at line 17, The command string "golangci-lint run ./..." is redundant; update the AGENTS.md entry to use the established, simpler command "golangci-lint run" by replacing the "golangci-lint run ./..." occurrence with "golangci-lint run" so the doc matches the default recursive behavior.internal/graphql/resolver/stock_plasmid_fp.go (1)
62-90: Duplicates existing validators inresolverutils/plasmid_filter.go.
resolverutils.CheckIDFieldandresolverutils.CheckInStockFieldalready encode the same predicates and error messages. Consider reusing them with aContraMap/adapter overPa.Tailinstead of re-implementing the logic here, so the "not yet supported" message stays in one place.♻️ Sketch
// in resolverutils (if not already exported), keep the *PlasmidListFilter-based predicates // and adapt here: var ( checkNilPlasmidIDFilter = adaptPairValidator(resolverutils.CheckIDField) checkNilPlasmidInStockFilter = adaptPairValidator(resolverutils.CheckInStockField) ) func adaptPairValidator( v func(*models.PlasmidListFilter) E.Either[error, *models.PlasmidListFilter], ) func(filterValidationPair) E.Either[error, filterValidationPair] { return func(pair filterValidationPair) E.Either[error, filterValidationPair] { return E.Map[error](func(*models.PlasmidListFilter) filterValidationPair { return pair })(v(Pa.Tail(pair))) } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/graphql/resolver/stock_plasmid_fp.go` around lines 62 - 90, Replace the duplicated predicates in checkNilPlasmidIDFilter and checkNilPlasmidInStockFilter by reusing resolverutils.CheckIDField and resolverutils.CheckInStockField: create a small adapter that takes a validator of *models.PlasmidListFilter (resolverutils.CheckIDField / CheckInStockField) and returns a predicate over filterValidationPair by calling the validator on Pa.Tail(pair) and mapping the success case back to the original pair (use E.Map or ContraMap-style mapping). Update checkNilPlasmidIDFilter and checkNilPlasmidInStockFilter to call this adapter instead of reimplementing the predicate and error messages so the "not yet supported" logic remains centralized in resolverutils.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 1-4: AGENTS.md currently only lists essential commands and omits
the repository's previous developer guidance from CLAUDE.md; restore and expand
documentation by adding sections for Coding Conventions (naming, formatting,
Go-specific style rules), Architectural Patterns (service boundaries, module
responsibilities, common package layout), Contribution Guidelines (PR process,
commit message format, review expectations), and Repository Policies (testing,
linting, CI requirements); ensure these sections reference existing conventions
used in the repo (e.g., Go style rules, test frameworks, linters) and mirror the
key guidance that was in CLAUDE.md so contributors have the same standards as
before.
- Around line 8-14: Replace the invalid gotestsum format
"pkgname-and-test-fails" used in the test commands with a valid format (for
example replace it with "pkgname" for package-oriented output or
"standard-verbose" if you need more verbosity) wherever "pkgname-and-test-fails"
appears; also update the AGENTS.md test command examples to use the valid
"testdox" already used for verbose test output if appropriate, and document that
gotestsum must be installed as a dev tool (either add it to go.mod as a
development requirement or add a note that developers must install gotestsum
separately).
---
Nitpick comments:
In `@AGENTS.md`:
- Line 17: The command string "golangci-lint run ./..." is redundant; update the
AGENTS.md entry to use the established, simpler command "golangci-lint run" by
replacing the "golangci-lint run ./..." occurrence with "golangci-lint run" so
the doc matches the default recursive behavior.
In `@internal/graphql/resolver/stock_plasmid_fp.go`:
- Around line 62-90: Replace the duplicated predicates in
checkNilPlasmidIDFilter and checkNilPlasmidInStockFilter by reusing
resolverutils.CheckIDField and resolverutils.CheckInStockField: create a small
adapter that takes a validator of *models.PlasmidListFilter
(resolverutils.CheckIDField / CheckInStockField) and returns a predicate over
filterValidationPair by calling the validator on Pa.Tail(pair) and mapping the
success case back to the original pair (use E.Map or ContraMap-style mapping).
Update checkNilPlasmidIDFilter and checkNilPlasmidInStockFilter to call this
adapter instead of reimplementing the predicate and error messages so the "not
yet supported" logic remains centralized in resolverutils.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 74e2020c-ce8c-4079-a182-b9bfa2447d07
📒 Files selected for processing (4)
AGENTS.mdCLAUDE.mdinternal/graphql/resolver/stock.gointernal/graphql/resolver/stock_plasmid_fp.go
💤 Files with no reviewable changes (1)
- CLAUDE.md
| # AGENTS.md | ||
|
|
||
|
|
||
| ## Essential Commands |
There was a problem hiding this comment.
Document coding conventions and guidelines, not just commands.
The AI summary indicates that the removed CLAUDE.md file contained Go coding conventions and repository guideline documentation (including style rules). This new file only documents essential commands, resulting in a loss of important developer guidance.
Consider adding sections that cover coding standards, architectural patterns, and contribution guidelines to maintain the documentation that was previously available.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 1 - 4, AGENTS.md currently only lists essential
commands and omits the repository's previous developer guidance from CLAUDE.md;
restore and expand documentation by adding sections for Coding Conventions
(naming, formatting, Go-specific style rules), Architectural Patterns (service
boundaries, module responsibilities, common package layout), Contribution
Guidelines (PR process, commit message format, review expectations), and
Repository Policies (testing, linting, CI requirements); ensure these sections
reference existing conventions used in the repo (e.g., Go style rules, test
frameworks, linters) and mirror the key guidance that was in CLAUDE.md so
contributors have the same standards as before.
| gotestsum --format pkgname-and-test-fails --format-hide-empty-pkg -- ./... | ||
|
|
||
| # Test (verbose) | ||
| gotestsum --format testdox --format-hide-empty-pkg -- ./... | ||
|
|
||
| # Watch mode | ||
| gotestsum --watch --format pkgname-and-test-fails --format-hide-empty-pkg -- ./... |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if gotestsum is used in the project and verify command validity
# Check if gotestsum is in go.mod or referenced elsewhere
rg -n "gotestsum" --type=yaml --type=md --type=go
# Check for any test scripts or Makefile that might define the canonical test command
fd -t f -e mk -e sh -e bash -e zsh --exec rg -l "test"Repository: dictyBase/graphql-server
Length of output: 323
🏁 Script executed:
# Check if CLAUDE.md exists in the repository
fd -i claude
# Look for CI configuration files
fd -e yml -e yaml | grep -i ci
# Check go.mod for dependencies and tools
head -50 go.modRepository: dictyBase/graphql-server
Length of output: 2130
🏁 Script executed:
# Look for Makefile or similar test definitions
fd -e mk
# Search for any references to CI or workflow tests
rg -n "go test" --type=yaml --type=go --type=md -A 2Repository: dictyBase/graphql-server
Length of output: 50
🌐 Web query:
gotestsum format flags documentation pkgname-and-test-fails testdox
💡 Result:
gotestsum is a Go test runner that wraps go test -json and provides various output formats via the --format flag or GOTESTSUM_FORMAT environment variable. Official documentation is in the GitHub README at https://github.com/gotestyourself/gotestsum. Key formats relevant to the query: - pkgname (default): Prints a line for each package, using icons/color to indicate pass/fail/skip status. Icons customizable via --format-icons or GOTESTSUM_FORMAT_ICONS. For passing packages, shows minimal info; for failing packages, shows number of failures (e.g., "0 failed" implied by pass icon, explicit count for fails). - testdox: Prints a readable sentence for each test using gotestdox (e.g., ✔ TestUserAuth_Login (0.23s), ✖ TestPayment_Stripe (0.92s) --- FAIL: invalid API key). Shows pass/fail with icons and elapsed time. No exact format named "pkgname-and-test-fails" exists in the docs. The pkgname format handles test failures by showing failure counts and details in the post-run summary for failed packages. Use --hide-summary to control summary details (e.g., --hide-summary=skipped). Full list of common formats (run gotestsum --help for all): - dots: character per test - pkgname: line per package (default) - testname: line per test+package - testdox: sentence per test - standard-quiet: go test default - standard-verbose: go test -v Examples: gotestsum --format=pkgname ./... gotestsum --format=testdox ./... After formatted output, a summary shows failures, skips, errors, and DONE line (e.g., DONE 9 tests, 1 failure in 3.2s). Latest version info as of 2026-04-15: v1.13.1-0.20260415004743-3cf14356a16c.
Citations:
- 1: https://github.com/gotestyourself/gotestsum
- 2: https://pkg.go.dev/gotest.tools/gotestsum
- 3: https://github.com/gotestyourself/gotestsum/blob/main/README.md
- 4: https://gotestsum.com/
Fix invalid gotestsum format flags in test commands.
The test commands in lines 8 and 14 use an invalid format flag: pkgname-and-test-fails does not exist in gotestsum's documented formats. Valid formats are: dots, pkgname, testname, testdox, standard-quiet, and standard-verbose.
Line 11 correctly uses testdox, which is valid. Replace the invalid pkgname-and-test-fails format on lines 8 and 14 with a valid alternative (e.g., pkgname for line 8, or use standard-verbose for verbosity if needed).
Additionally, gotestsum is not listed in go.mod as a dependency, so either add it as a development tool or document that it must be installed separately.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 8 - 14, Replace the invalid gotestsum format
"pkgname-and-test-fails" used in the test commands with a valid format (for
example replace it with "pkgname" for package-oriented output or
"standard-verbose" if you need more verbosity) wherever "pkgname-and-test-fails"
appears; also update the AGENTS.md test command examples to use the valid
"testdox" already used for verbose test output if appropriate, and document that
gotestsum must be installed as a dev tool (either add it to go.mod as a
development requirement or add a note that developers must install gotestsum
separately).
Restore the ontology prefix and the equality operator (==) in the plasmid filter query to match stock service and test expectations. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
Update plasmid type filter queries to use triple equals (===) for exact matching and adjust unit tests to reflect this change. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
Remove ontology prefix from plasmid type filters and use tag=== for exact matching. Update unit tests to match the simplified format. 💘 Generated with Crush Assisted-by: Google: Gemini 3 Flash Preview via Crush <crush@charm.land>
Pulling 'fix/list-plasmids-expression into develop. Please review and merge.
Summary by CodeRabbit
Documentation
Bug Fixes