Skip to content

Centralize Ashby slug list to eliminate duplication between Python and TypeScript#7

Merged
Mayank-glitch-cpu merged 3 commits intocodex/integrate-ashby-job-ingestion-strategyfrom
copilot/sub-pr-2-one-more-time
Feb 11, 2026
Merged

Centralize Ashby slug list to eliminate duplication between Python and TypeScript#7
Mayank-glitch-cpu merged 3 commits intocodex/integrate-ashby-job-ingestion-strategyfrom
copilot/sub-pr-2-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

The curated Ashby company slug list was duplicated between scripts/ashby_slugs_verified.py and backend/src/services/theirstack-fetcher.ts, creating drift risk.

Changes

  • Created canonical source: backend/src/constants/ashby-slugs.json containing all 251 company slugs
  • Python script: Removed hardcoded array, now loads from JSON via load_canonical_slugs()
  • TypeScript backend: Replaced 34-line hardcoded array with runtime JSON import using readFileSync
  • Gitignore: Excluded generated script outputs (.txt, .csv files)

Implementation

TypeScript loads the shared list at module initialization:

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const ashbySlugsPath = join(__dirname, '../constants/ashby-slugs.json');
const ASHBY_COMPANY_SLUGS: readonly string[] = JSON.parse(readFileSync(ashbySlugsPath, 'utf-8'));

Python script dynamically loads the same source:

def load_canonical_slugs() -> list[str]:
    canonical_path = Path(__file__).resolve().parent.parent / 'backend' / 'src' / 'constants' / 'ashby-slugs.json'
    with canonical_path.open('r') as f:
        return json.load(f)

Both systems now reference a single source of truth, eliminating maintenance overhead and drift.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 11, 2026 18:43
Co-authored-by: Mayank-glitch-cpu <85422185+Mayank-glitch-cpu@users.noreply.github.com>
Co-authored-by: Mayank-glitch-cpu <85422185+Mayank-glitch-cpu@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on expanding Ashby slug pool Centralize Ashby slug list to eliminate duplication between Python and TypeScript Feb 11, 2026
@Mayank-glitch-cpu Mayank-glitch-cpu marked this pull request as ready for review February 11, 2026 18:55
@Mayank-glitch-cpu Mayank-glitch-cpu merged commit f43da9e into codex/integrate-ashby-job-ingestion-strategy Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants