Skip to content

fix: PR File Ingestion Fails for Valid Git Paths Longer Than 500 Characters#136

Open
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:fix/pr-file-ingestion-fail
Open

fix: PR File Ingestion Fails for Valid Git Paths Longer Than 500 Characters#136
jonathanchang31 wants to merge 1 commit into
entrius:testfrom
jonathanchang31:fix/pr-file-ingestion-fail

Conversation

@jonathanchang31
Copy link
Copy Markdown

Summary

This PR fixes PR file ingestion failures for valid Git paths longer than 500 characters.
The mirror previously stored PR file paths in VARCHAR(500) columns. Valid Git/GitHub file paths can exceed that length, causing Postgres to reject PR_FILES ingestion with:

ERROR: value too long for type character varying(500)

This change stores PR file paths as TEXT so long valid paths can be ingested, stored, and returned through the mirror API.

Related Issue

Fixes #134

Change Type

  • Bug fix
  • Database schema change
  • Runtime ingestion fix
  • API behavior fix
  • Scoring data reliability fix
  • New feature
  • Refactor only
  • Documentation only

Real Behavior Proof

Before the fix, a valid 602-character Git path failed at the DB layer:

ERROR: value too long for type character varying(500)

After the fix, the same long path inserts and reads back correctly:

filename_length=602 previous_filename_length=606
602  606  602  new

API readback also succeeds:

{
  "repo_full_name": "codex-smoke/api-long-path",
  "pr_number": 7,
  "scoring_data_stored": true,
  "file_count": 1,
  "filename_length": 602,
  "head_content": "export const x = 1;"
}

Checklist

  • Fixes the reported issue
  • Keeps the change scoped to PR file path storage
  • Includes DB patch for existing deployments
  • Updates fresh schema files
  • Updates TypeORM entities
  • Validates real long-path behavior
  • Validates DAS still builds and runs
  • Validates connected gittensor tests still pass
  • Does not change scoring logic
  • Does not introduce unrelated behavior changes

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical: PR File Ingestion Fails for Valid Git Paths Longer Than 500 Characters

1 participant