docs: verify #283 — cross-link hybrid route cache discount tier in invariants/skills #764
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!764
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/verify-issue-283-cache-tier-docs-2432"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Verified GitLab #283 (hybrid solver cache key must include resolved discount tier). The code fix landed in MR !751 (
a6ac683); this MR closes a docs/skills drift gap: invariants and agent skills still described hybrid GET cache keys astrader|noneonly, without thediscount_tiersegment added by #283.Updates:
docs/indexer-invariants.md— route GET cache key row now documentsdiscount_tierresolution (traderif set, elsesender; unknown → 0) and links #283.docs/integrators.md— L8 fee-discount paragraph cross-links #283 tier-based cache sharing.skills/AGENTS_HYBRID_QUOTING.md— rule #7 + canonical docs + test command forhybrid_cache_keyunit tests.skills/AGENTS_INDEXER_HYBRID_BEST_EXECUTION.md— related invariants link.Verification checklist (acceptance → command/output)
traderunset but different discount eligibility get distinct cached quotesresolve_discount_tierusestrader.or(sender)→traders.tier_id;hybrid_cache_keyappends|t{tier}; unit testhybrid_cache_key_distinguishes_discount_tierasserts tier0 ≠ tier5tier5key equals for two differentsenderaddresses with tier 5hybrid_cache_keystays pure/sync; tier lookup in callerresolve_discount_tierasync inexecute_hybrid_route_solve;hybrid_cache_keyis sync fn takingdiscount_tier: i16maybe_simulateforwardstrader+senderto router simroute_solver.rsmaybe_simulatesender≠trader, key on both tiers)tier_idsync staleness (~600s)hybrid_cache_key_*cd indexer && cargo test hybrid_cache_key --lib→ 2 passedcd indexer && cargo test --lib→ 98 passedcd indexer && cargo test --test api_route_solve -j 1 -- --test-threads=1→ 19 passedpython3 scripts/check_fee_discount_tier_docs.py→ OKFollow-ups
traderandsendertiers whenis_trusted_routerpath applies (sender≠trader).tradersrows with differenttier_idand asserting HTTP cache isolation.Related to #283
changed the description
Security review
Commit reviewed:
faccef2512ed21801d7798e3290580b84884330bScope: Documentation and agent-skills updates only — 4 Markdown files (
docs/indexer-invariants.md,docs/integrators.md,skills/AGENTS_HYBRID_QUOTING.md,skills/AGENTS_INDEXER_HYBRID_BEST_EXECUTION.md). Cross-links GitLab #283 (hybrid GET route cache key includes resolveddiscount_tier). No application code, dependencies, CI, or configuration changes in this diff.Method: Full MR diff reviewed. Traced whether added text introduces attacker-controlled sinks (injection, XSS, SSRF, auth bypass, secret exposure, unsafe deserialization). Unchanged runtime code was not re-audited; the described #283 cache-key behavior was already implemented in MR !751.
Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Inline threads: None (no findings to anchor).
Notes: Changes are descriptive only (cache key composition, tier resolution, test command). They document a correctness fix that prevents cross-tier cache collision; they do not alter HTTP handlers, auth, or data paths. Residual accepted caveats (#279 trusted-router dual-tier key, tier sync staleness) are pre-existing and out of scope for this docs MR.
mentioned in commit
6420a7747dmentioned in issue #303
mentioned in issue #283