fix(orb): cap gate_verdict length in orb_signals ingest (#8333)#8429
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8429 +/- ##
==========================================
- Coverage 92.42% 89.61% -2.81%
==========================================
Files 791 98 -693
Lines 79259 22772 -56487
Branches 23948 3896 -20052
==========================================
- Hits 73252 20407 -52845
+ Misses 4868 2187 -2681
+ Partials 1139 178 -961
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 13:11:32 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
src/orb/ingest.ts'sorb_signalsinsert loop capped every sibling string field (repo_hash/pr_hashatMAX_HASH_CHARS,gate_reasoncode_bucketatMAX_BUCKET_CHARS,instance_idatMAX_INSTANCE_ID_CHARS) exceptgate_verdict, which was only type-checked. Added aMAX_VERDICT_CHARS(32) constant and gated thegate_verdictbind the same waygate_reasoncode_bucketalready is, so an oversized value from a malformed or hostile self-hosted instance is coerced tonullinstead of written unbounded.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Closes #8333
Validation
git diff --checknpm run typechecknpx vitest run test/integration/orb-ingest.test.ts --coverage --coverage.include="src/orb/ingest.ts"— 100% statements/branches/functions/lines onsrc/orb/ingest.tsnpm run actionlintnpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
src/orb/ingest.tsand its integration test (no UI/MCP/worker/OpenAPI surface touched), so the UI/MCP/workers/OpenAPI-specific checks above were not run locally; they are unaffected by this diff and are still exercised by the full CI gate.Safety
gate_verdictwas already a nullable string field.)UI Evidencesection below. (N/A — no visible UI change.)UI Evidence
N/A — this is a backend validation-only change with no visible UI surface.
Notes
gate_verdict's validation changed; no other field in the insert loop was touched, per the issue's own scope note.