{"project_id": "p0003", "query": "where does the backend server code sit and how do the modules get hooked up at startup?", "query_type": "natural", "positives": ["p0003-f01"], "candidates": [{"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I'm lost, which directory holds the server-side controllers and services for the scheduling stuff?", "query_type": "natural", "positives": ["p0003-f01"], "candidates": [{"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where is the root module for the api that wires everything?", "query_type": "natural", "positives": ["p0003-f01"], "candidates": [{"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "wheres the backend root module thing, the server code dir??", "query_type": "messy", "positives": ["p0003-f01"], "candidates": [{"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where does the browser-side app code go, and is it its own project or mixed into the server?", "query_type": "natural", "positives": ["p0003-f02"], "candidates": [{"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "which folder has the screens and the reusable widgets for the client?", "query_type": "natural", "positives": ["p0003-f02"], "candidates": [{"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where do I put a new screen in the client code, given the ui is its own thing?", "query_type": "natural", "positives": ["p0003-f02"], "candidates": [{"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "client side stuff where do screens n widgets go idk", "query_type": "messy", "positives": ["p0003-f02"], "candidates": [{"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my new notes field on visits keeps showing up as readable text in the database, is that ok?", "query_type": "natural", "positives": ["p0003-f03"], "candidates": [{"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I want to save the visit reason but compliance says the raw text must never hit storage as-is, how do I do that?", "query_type": "natural", "positives": ["p0003-f03"], "candidates": [{"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it fine to just insert the reason text straight into the db row for visits?", "query_type": "natural", "positives": ["p0003-f03"], "candidates": [{"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "saving visit notes to db, do i need to scramble them first or whatever", "query_type": "messy", "positives": ["p0003-f03"], "candidates": [{"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "searching visit notes with a LIKE query returns nothing even though the text exists, why?", "query_type": "natural", "positives": ["p0003-f04"], "candidates": [{"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "sorting my patient-related rows by the sensitive text column gives random order, what's going on?", "query_type": "natural", "positives": ["p0003-f04"], "candidates": [{"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I ORDER BY the reason column on the visits table?", "query_type": "natural", "positives": ["p0003-f04"], "candidates": [{"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "search by notes in sql not working??? the match returns zero rows", "query_type": "messy", "positives": ["p0003-f04"], "candidates": [{"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "after I changed the secret used to scramble data, old records can't be opened anymore, what happened?", "query_type": "natural", "positives": ["p0003-f05"], "candidates": [{"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where should the key material be kept so it isn't checked into git?", "query_type": "natural", "positives": ["p0003-f05"], "candidates": [{"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I want to swap the key, what happens to rows already saved?", "query_type": "natural", "positives": ["p0003-f05"], "candidates": [{"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "rotated the enc key and now old rows are garbage??", "query_type": "messy", "positives": ["p0003-f05"], "candidates": [{"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why do we scramble fields in node instead of letting the DB do it for us?", "query_type": "natural", "positives": ["p0003-f06"], "candidates": [{"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "we want to change keys without touching the database engine, how is that handled?", "query_type": "natural", "positives": ["p0003-f06"], "candidates": [{"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why not use built-in db functions to encrypt columns?", "query_type": "natural", "positives": ["p0003-f06"], "candidates": [{"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why encrypt in app not in pg? keys stay off the db right", "query_type": "messy", "positives": ["p0003-f06"], "candidates": [{"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "auditors asked us to prove who opened each patient record and when, where is that captured?", "query_type": "natural", "positives": ["p0003-f07"], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I added a new endpoint and the compliance check says it's missing from the access trail, why?", "query_type": "natural", "positives": ["p0003-f07"], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "does every route hitting patient data get logged with user id and time?", "query_type": "natural", "positives": ["p0003-f07"], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is every endpoint logged for audit? new one i added isnt showing up", "query_type": "messy", "positives": ["p0003-f07"], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "someone wants a cleanup job to prune old access history entries, is that allowed?", "query_type": "natural", "positives": ["p0003-f08"], "candidates": [{"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I fix a typo in a logged access entry directly in the database?", "query_type": "natural", "positives": ["p0003-f08"], "candidates": [{"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can the app's database user edit the access history table?", "query_type": "natural", "positives": ["p0003-f08"], "candidates": [{"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can we just delet old access log entries from db or nah", "query_type": "messy", "positives": ["p0003-f08"], "candidates": [{"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "our access history must show who did what but I'm worried it could expose the patient's stuff; what can go in it?", "query_type": "natural", "positives": ["p0003-f09"], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "should I dump the full incoming payload into the access trail for debugging?", "query_type": "natural", "positives": ["p0003-f09"], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it okay to store the submitted form payload in the access history?", "query_type": "natural", "positives": ["p0003-f09"], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can i dump the whole payload into audit stuff for debugging", "query_type": "messy", "positives": ["p0003-f09"], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "access logs only show successful visits, failed or forbidden attempts are missing, why?", "query_type": "natural", "positives": ["p0003-f10"], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "unauthorized attempts on patient endpoints don't leave any trace in the log, how do I fix?", "query_type": "natural", "positives": ["p0003-f10"], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the logging only fires on 200s; how to capture 403 hits too?", "query_type": "natural", "positives": ["p0003-f10"], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why r blocked attempts not in the access log?? only ok ones show", "query_type": "messy", "positives": ["p0003-f10"], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the logged-in user object is missing its id and roles after a valid login, where does that get filled in?", "query_type": "natural", "positives": ["p0003-f11"], "candidates": [{"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how does the server decide who's logged in from the bearer header?", "query_type": "natural", "positives": ["p0003-f11"], "candidates": [{"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where is the token verified and turned into a user object?", "query_type": "natural", "positives": ["p0003-f11"], "candidates": [{"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where does the bearer token get checked n turned into user??", "query_type": "messy", "positives": ["p0003-f11"], "candidates": [{"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "after we tweaked the identity provider settings, every user suddenly gets 403 on all screens, why?", "query_type": "natural", "positives": ["p0003-f12"], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "all staff lost access after an auth config change, nobody has permissions anymore", "query_type": "natural", "positives": ["p0003-f12"], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "users got locked out of everything after changing the identity config prefix, what broke?", "query_type": "natural", "positives": ["p0003-f12"], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "since we renamed stuff in auth0 everyone gets forbidden??", "query_type": "messy", "positives": ["p0003-f12"], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my brand new route keeps returning forbidden even though the user is an admin, why?", "query_type": "natural", "positives": ["p0003-f13"], "candidates": [{"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I added an API method and every call says 403 for logged in staff", "query_type": "natural", "positives": ["p0003-f13"], "candidates": [{"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "new handler returns 403 for everyone, what am I missing?", "query_type": "natural", "positives": ["p0003-f13"], "candidates": [{"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "new api thing keeps giving 403 even for admins wtf", "query_type": "messy", "positives": ["p0003-f13"], "candidates": [{"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "a user from one clinic can see bookings from another clinic when listing, how do I stop that?", "query_type": "natural", "positives": ["p0003-f14"], "candidates": [{"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the list endpoint returns patients from other locations, need it to only show my site's rows", "query_type": "natural", "positives": ["p0003-f14"], "candidates": [{"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "listing visits pulls in other clinics' data, how to limit by the logged-in user's site?", "query_type": "natural", "positives": ["p0003-f14"], "candidates": [{"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "other clinics appointments showing up in my list, fix pls", "query_type": "messy", "positives": ["p0003-f14"], "candidates": [{"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "two patients got the same doctor slot when booking at the same moment, how do I stop that?", "query_type": "natural", "positives": ["p0003-f15"], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "occasionally a clinician ends up with overlapping visits when two front desk people book at once", "query_type": "natural", "positives": ["p0003-f15"], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the overlap check passes but two bookings still land on the same slot under load, what's wrong?", "query_type": "natural", "positives": ["p0003-f15"], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "same doc double booked when 2 people click save at same time", "query_type": "messy", "positives": ["p0003-f15"], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "appointments shift by an hour twice a year in the API responses, what's causing it?", "query_type": "natural", "positives": ["p0003-f16"], "candidates": [{"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "when daylight time changes our visits seem off by one hour in reports, should I convert on server?", "query_type": "natural", "positives": ["p0003-f16"], "candidates": [{"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where should I shift times for the clinic's local zone so DST doesn't bite?", "query_type": "natural", "positives": ["p0003-f16"], "candidates": [{"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "dst messing up visit hours, where do we do the zone conversion", "query_type": "messy", "positives": ["p0003-f16"], "candidates": [{"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I need a new column on visits, can I just let the ORM auto-update the database on boot?", "query_type": "natural", "positives": ["p0003-f17"], "candidates": [{"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how do I change the database structure so it gets applied in every environment reliably?", "query_type": "natural", "positives": ["p0003-f17"], "candidates": [{"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "adding a column to visit table, do I write a file or just edit the entity?", "query_type": "natural", "positives": ["p0003-f17"], "candidates": [{"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "need new db field, do i just change entity and restart", "query_type": "messy", "positives": ["p0003-f17"], "candidates": [{"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I fixed a bug in the very first database setup file, but staging still behaves the old way, why?", "query_type": "natural", "positives": ["p0003-f18"], "candidates": [{"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I tweak the initial schema script that already ran in production?", "query_type": "natural", "positives": ["p0003-f18"], "candidates": [{"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "should I edit the first setup script to correct a column type?", "query_type": "natural", "positives": ["p0003-f18"], "candidates": [{"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "i changed the original db setup file but prod didnt change, y", "query_type": "messy", "positives": ["p0003-f18"], "candidates": [{"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where do I set the app-wide response protections and cross-origin rules when the server starts?", "query_type": "natural", "positives": ["p0003-f19"], "candidates": [{"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where does the server start up and attach its shared settings?", "query_type": "natural", "positives": ["p0003-f19"], "candidates": [{"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where to add the security response header middleware on startup?", "query_type": "natural", "positives": ["p0003-f19"], "candidates": [{"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where server starts n sets up headers and cross origin stuff", "query_type": "messy", "positives": ["p0003-f19"], "candidates": [{"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "frontend gets blocked by the browser when calling the API from a different domain, how do I allow just ours?", "query_type": "natural", "positives": ["p0003-f20"], "candidates": [{"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it ok to just allow any site to call our API with credentials?", "query_type": "natural", "positives": ["p0003-f20"], "candidates": [{"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "should I open CORS to all domains to fix the browser error?", "query_type": "natural", "positives": ["p0003-f20"], "candidates": [{"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can i just allow * for cors to stop the browser error", "query_type": "messy", "positives": ["p0003-f20"], "candidates": [{"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "a client sent an extra field in the request and the record got updated with it, how do I block that?", "query_type": "natural", "positives": ["p0003-f21"], "candidates": [{"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "hackers could slip in fields we don't expect when creating a visit, how do we reject them?", "query_type": "natural", "positives": ["p0003-f21"], "candidates": [{"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "unexpected fields in the POST body are being saved, how to make the server refuse them?", "query_type": "natural", "positives": ["p0003-f21"], "candidates": [{"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "extra junk fields in json getting saved to visit rows, stop it", "query_type": "messy", "positives": ["p0003-f21"], "candidates": [{"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "if a user walks away from the screen, the page should kick them out after a while with a warning; how do I do that?", "query_type": "natural", "positives": ["p0003-f22"], "candidates": [{"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "staff left the computer open and patient data stayed visible, need the page to lock after some minutes", "query_type": "natural", "positives": ["p0003-f22"], "candidates": [{"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "we need a countdown popup before the app signs people out when idle, where?", "query_type": "natural", "positives": ["p0003-f22"], "candidates": [{"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "screen stays logged in forever when nobody touches it, add timeout??", "query_type": "messy", "positives": ["p0003-f22"], "candidates": [{"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "someone on a shared computer could still find login credentials after they've left; where should the credential live instead?", "query_type": "natural", "positives": ["p0003-f23"], "candidates": [{"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where's the safest spot to hold the login credential in a browser so it's gone on refresh?", "query_type": "natural", "positives": ["p0003-f23"], "candidates": [{"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it fine to save the bearer credential in browser local persistent storage between visits?", "query_type": "natural", "positives": ["p0003-f23"], "candidates": [{"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it ok to keep the jwt in browser storage so it survives reload", "query_type": "messy", "positives": ["p0003-f23"], "candidates": [{"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my timeout tests take forever and randomly fail on CI, what's the trick?", "query_type": "natural", "positives": ["p0003-f24"], "candidates": [{"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the test suite for the auto-kick feature waits real seconds and times out sporadically", "query_type": "natural", "positives": ["p0003-f24"], "candidates": [{"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how to test the inactivity countdown without waiting minutes in jest?", "query_type": "natural", "positives": ["p0003-f24"], "candidates": [{"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "test for logout timer is slow n flaky, any fix", "query_type": "messy", "positives": ["p0003-f24"], "candidates": [{"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I want to debug the booking screen by logging what the user typed, is that safe?", "query_type": "natural", "positives": ["p0003-f25"], "candidates": [{"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "errors in the scheduling page should go to our monitoring tool, can I include the person's name?", "query_type": "natural", "positives": ["p0003-f25"], "candidates": [{"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I add console.log of the visit object while debugging the schedule view?", "query_type": "natural", "positives": ["p0003-f25"], "candidates": [{"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "ok to log patient name when the booking page errors?", "query_type": "messy", "positives": ["p0003-f25"], "candidates": [{"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "users get different error messages in the browser than the server gives when submitting a visit; how to align?", "query_type": "natural", "positives": ["p0003-f26"], "candidates": [{"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the form lets me submit things the backend rejects; where do I put the checks?", "query_type": "natural", "positives": ["p0003-f26"], "candidates": [{"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where should I add a new field check for the booking screen so it matches server?", "query_type": "natural", "positives": ["p0003-f26"], "candidates": [{"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "form accepts stuff api rejects, which spot to fix", "query_type": "messy", "positives": ["p0003-f26"], "candidates": [{"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "integration tests fail with connection refused to the database before anything runs, what do I start first?", "query_type": "natural", "positives": ["p0003-f27"], "candidates": [{"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my test run can't reach the DB; what's the setup step I'm missing?", "query_type": "natural", "positives": ["p0003-f27"], "candidates": [{"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "tests say no database running; how do I bring up the DB container for the api tests?", "query_type": "natural", "positives": ["p0003-f27"], "candidates": [{"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "e2e fails cant connect db, what do i start first", "query_type": "messy", "positives": ["p0003-f27"], "candidates": [{"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I use the default db username and password from the repo on our staging box?", "query_type": "natural", "positives": ["p0003-f28"], "candidates": [{"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "is it okay to load fake visit data with names into my laptop database for demos?", "query_type": "natural", "positives": ["p0003-f28"], "candidates": [{"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "can I copy the local stack's passwords into prod config?", "query_type": "natural", "positives": ["p0003-f28"], "candidates": [{"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "ok to use the compose default password on server?", "query_type": "messy", "positives": ["p0003-f28"], "candidates": [{"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my change is ready but the merge button is blocked until some automated checks finish; what do they run?", "query_type": "natural", "positives": ["p0003-f29"], "candidates": [{"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "PR can't land yet, what automated checks are gating it and what must be green?", "query_type": "natural", "positives": ["p0003-f29"], "candidates": [{"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why won't my pull request merge, the checks are red?", "query_type": "natural", "positives": ["p0003-f29"], "candidates": [{"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why cant i merge, some check failing on my branch", "query_type": "messy", "positives": ["p0003-f29"], "candidates": [{"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how long do we have to keep access history and what exactly gets recorded for it?", "query_type": "natural", "positives": ["p0003-f30"], "candidates": [{"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "auditors want written info on how long the access trail lives; where's that?", "query_type": "natural", "positives": ["p0003-f30"], "candidates": [{"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I changed the access history columns; do I need to touch any docs?", "query_type": "natural", "positives": ["p0003-f30"], "candidates": [{"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "changed audit log fields, do docs need update?", "query_type": "messy", "positives": ["p0003-f30"], "candidates": [{"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "an auditor wants a list linking each compliance requirement to the code that meets it, where's that?", "query_type": "natural", "positives": ["p0003-f31"], "candidates": [{"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "we added a patient feature, what paperwork needs to change so the compliance file stays accurate?", "query_type": "natural", "positives": ["p0003-f31"], "candidates": [{"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where's the cross-reference of compliance rules to source files? I need to update it for the new feature.", "query_type": "natural", "positives": ["p0003-f31"], "candidates": [{"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where r the compliance-to-code docs, need to add my new thing", "query_type": "messy", "positives": ["p0003-f31"], "candidates": [{"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "I'm adding a new route that handles visit data; what's the checklist before merging it?", "query_type": "natural", "positives": ["p0003-f32"], "candidates": [{"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "what steps make sure a new patient-facing call is protected, logged, and tested?", "query_type": "natural", "positives": ["p0003-f32"], "candidates": [{"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "checklist for a new route that touches patient info, what do I wire up?", "query_type": "natural", "positives": ["p0003-f32"], "candidates": [{"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "new route with patient stuff, whats the checklist to not fail review", "query_type": "messy", "positives": ["p0003-f32"], "candidates": [{"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "a doctor logs in and sees everyone's bookings on the calendar; should they only see their own?", "query_type": "natural", "positives": ["p0003-f33"], "candidates": [{"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "the reception login shows only one clinician's agenda, but admin sees all, is that by design?", "query_type": "natural", "positives": ["p0003-f33"], "candidates": [{"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "why can a doctor see other doctors' appointments in their view?", "query_type": "natural", "positives": ["p0003-f33"], "candidates": [{"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "docs seeing other docs bookings, should be only theirs?", "query_type": "messy", "positives": ["p0003-f33"], "candidates": [{"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "our integration tests keep failing because the login server is down during CI; how to avoid needing it?", "query_type": "natural", "positives": ["p0003-f34"], "candidates": [{"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "test runs hit the real identity service and get rate limited; can I fake the tokens?", "query_type": "natural", "positives": ["p0003-f34"], "candidates": [{"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how to make fake login tokens for e2e without the real identity provider?", "query_type": "natural", "positives": ["p0003-f34"], "candidates": [{"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "tests need auth but ci cant reach the login provider, fake it how", "query_type": "messy", "positives": ["p0003-f34"], "candidates": [{"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where are the cloud resources described and how do I bring up the whole environment from scratch?", "query_type": "natural", "positives": ["p0003-f35"], "candidates": [{"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how do I run the front and back halves together with one command from the top of the repo?", "query_type": "natural", "positives": ["p0003-f35"], "candidates": [{"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "where do cloud resource definitions live and how are they applied?", "query_type": "natural", "positives": ["p0003-f35"], "candidates": [{"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "how do i start api+web together, and where r the cloud config files", "query_type": "messy", "positives": ["p0003-f35"], "candidates": [{"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f11", "text": "Auth0 JWT validation is implemented in the Passport strategy, which maps token claims to the request user used by guards and the audit interceptor.", "anchors": ["api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "new PHI endpoint: how do I add it so it's protected, audited, and tested?", "query_type": "natural", "positives": ["p0003-f07", "p0003-f32"], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f27", "text": "Run the e2e tests against the Postgres service from docker-compose (docker compose up -d db) before running the api test suite.", "anchors": ["docker-compose.yml", "api/test/appointments.e2e-spec.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "adding a visit notes field: how do I encrypt it and ship the schema change properly?", "query_type": "natural", "positives": ["p0003-f03", "p0003-f17"], "candidates": [{"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "my new route 403s after the role claim got renamed in the identity dashboard, what do I check?", "query_type": "natural", "positives": ["p0003-f12", "p0003-f13"], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "search by reason on the list endpoint returns nothing, and it should only show my clinic's rows", "query_type": "natural", "positives": ["p0003-f04", "p0003-f14"], "candidates": [{"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "failed booking attempts are logged with the patient's name in the message, is that a problem?", "query_type": "natural", "positives": ["p0003-f10", "p0003-f25"], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f35", "text": "Infrastructure is defined with Terraform and the root package.json scripts coordinate api and web tasks.", "anchors": ["package.json", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "we need to rotate the encryption key and roll out the change to prod, what order?", "query_type": "natural", "positives": ["p0003-f05", "p0003-f18"], "candidates": [{"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "browser calls to the API fail CORS and I'm tempted to send the bearer token from localStorage, what's right?", "query_type": "natural", "positives": ["p0003-f20", "p0003-f23"], "candidates": [{"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "two people booked the same slot and the calendar shows the wrong hour after DST, where do I look?", "query_type": "natural", "positives": ["p0003-f15", "p0003-f16"], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 1, "source": "positive"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "whatever you think", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "lgtm do it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f20", "text": "CORS origins must be restricted to the known web app origin; do not use wildcard origins because requests carry bearer tokens for PHI endpoints.", "anchors": ["api/src/main.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0003-f34", "text": "Appointment e2e tests should mock Auth0 by signing test JWTs with a local key rather than calling the live tenant.", "anchors": ["api/test/appointments.e2e-spec.ts", "api/src/auth/jwt.strategy.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "you decide", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f28", "text": "docker-compose credentials and keys are dev-only fixtures; never reuse them in real environments or seed real patient data locally.", "anchors": ["docker-compose.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f30", "text": "Audit log design (append-only, retention period, what is captured) is documented and should be updated whenever the audit schema changes.", "anchors": ["docs/audit-log-design.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f06", "text": "Field-level encryption is done in the application layer rather than with Postgres pgcrypto so keys never reach the database and can be rotated by the app.", "anchors": ["api/src/crypto/field-encryption.service.ts", "docs/hipaa-controls.md"], "label": 0, "source": "random"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "yes please", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f16", "text": "Appointment times are stored as UTC timestamptz and converted to the clinic's timezone only in the web UI, avoiding DST bugs in the API.", "anchors": ["api/src/appointments/appointment.entity.ts", "web/src/pages/Calendar.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f01", "text": "The NestJS API lives under api/src, with feature folders for appointments, audit, auth, crypto and providers wired together in AppModule.", "anchors": ["api/src/app.module.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f04", "text": "Encrypted columns cannot be searched or sorted with SQL LIKE/ORDER BY because they hold ciphertext; filter by non-PHI fields (provider, date range, status) and decrypt in the service layer.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f26", "text": "AppointmentForm is the single place for creating and editing appointments in the UI; validation rules there should mirror the API DTO validation.", "anchors": ["web/src/pages/AppointmentForm.tsx", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "yep", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f17", "text": "To add a schema change, create a new timestamped migration in api/src/migrations; do not rely on TypeORM synchronize, which is disabled for HIPAA change control.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f32", "text": "To add a new PHI-bearing endpoint: add the route with @Roles, register it under the audit interceptor, encrypt sensitive fields via the crypto service, and add an e2e test asserting an audit row is written.", "anchors": ["api/src/appointments/appointments.controller.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f29", "text": "CI runs lint, unit and e2e tests on pull requests via the GitHub workflow; the workflow must pass before merging.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f02", "text": "The React frontend is a separate package in web/ with its own package.json; pages live in web/src/pages and shared UI in web/src/components.", "anchors": ["web/package.json", "web/src/App.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f31", "text": "The mapping of HIPAA controls to the code that implements them (encryption, audit, access, logoff) is kept in the controls doc and should be updated with new PHI features.", "anchors": ["docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f22", "text": "The web app must auto-logout after inactivity (HIPAA automatic logoff); useSession tracks activity and IdleTimeoutModal warns before the session is cleared.", "anchors": ["web/src/hooks/useSession.ts", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "random"}, {"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f09", "text": "Audit entries must never contain PHI values themselves, only resource ids and field names; logging request bodies would leak PHI into a less protected table.", "anchors": ["api/src/audit/audit.interceptor.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f05", "text": "Encryption keys must come from environment/secret manager configuration and never be committed; losing or rotating a key without re-encrypting existing rows makes data unreadable.", "anchors": ["api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f18", "text": "Never edit the already applied init migration; add a follow-up migration instead, since deployed environments have recorded it as run.", "anchors": ["api/src/migrations/1700000000000-init.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f08", "text": "Audit log rows are append-only: no update or delete code paths and the DB role used by the app should lack UPDATE/DELETE on the audit table.", "anchors": ["api/src/audit/audit-log.entity.ts", "docs/audit-log-design.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f10", "text": "The audit interceptor must record failed and denied requests too, not just successes, so it should handle errors in the observable stream (catchError) before rethrowing.", "anchors": ["api/src/audit/audit.interceptor.ts", "api/test/audit.e2e-spec.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f23", "text": "Do not store access tokens or patient data in localStorage; keep tokens in memory so they vanish on logout or tab close.", "anchors": ["web/src/hooks/useSession.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f03", "text": "PHI fields on appointments (e.g. reason for visit, notes) must be encrypted through FieldEncryptionService before persistence; never write plaintext PHI columns directly.", "anchors": ["api/src/appointments/appointment.entity.ts", "api/src/crypto/field-encryption.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "random"}]} {"project_id": "p0003", "query": "sure, proceed", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0003-f14", "text": "Clinic-scoped access: queries in the appointments service must filter by the caller's clinic id to avoid cross-tenant PHI exposure.", "anchors": ["api/src/appointments/appointments.service.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f24", "text": "Idle timer tests need fake timers; advancing real time makes the Calendar and modal tests slow and flaky.", "anchors": ["web/src/__tests__/Calendar.test.tsx", "web/src/components/IdleTimeoutModal.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f33", "text": "Provider calendar data access is limited by role: providers see their own schedule while front-desk and admin roles can see clinic-wide schedules.", "anchors": ["api/src/providers/providers.service.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f07", "text": "Every request touching PHI must be recorded by AuditInterceptor with actor id, action, resource and timestamp; new controllers must be covered by the interceptor or audit coverage is broken.", "anchors": ["api/src/audit/audit.interceptor.ts", "docs/hipaa-controls.md"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f13", "text": "Endpoints are deny-by-default: RolesGuard requires an explicit @Roles decorator, so new controller routes without roles will return 403.", "anchors": ["api/src/auth/roles.guard.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f25", "text": "Patient names and appointment details must not be written to console logs or error reporting from the frontend, since these are PHI.", "anchors": ["web/src/pages/Calendar.tsx", "web/src/pages/AppointmentForm.tsx"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f12", "text": "Role claims come from a namespaced custom claim added by an Auth0 action; if the claim namespace is changed in Auth0, RolesGuard will see no roles and deny everyone.", "anchors": ["api/src/auth/jwt.strategy.ts", "api/src/auth/roles.guard.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0003-f15", "text": "Double-booking is prevented by checking provider time-range overlap in the service inside a transaction; checking outside the transaction allows races between concurrent requests.", "anchors": ["api/src/appointments/appointments.service.ts", "api/src/providers/providers.service.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f21", "text": "The ValidationPipe is set to whitelist and forbid unknown properties so clients cannot inject extra fields into PHI entities.", "anchors": ["api/src/main.ts", "api/src/appointments/appointments.controller.ts"], "label": 0, "source": "random"}, {"fact_id": "p0003-f19", "text": "main.ts bootstraps the app and is where global pipes, security headers (helmet) and CORS are configured.", "anchors": ["api/src/main.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where does the app start up and wire together all the endpoints?", "query_type": "natural", "positives": ["p0006-f01"], "candidates": [{"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "which file do I open to see how the web app boots and hooks up its handlers?", "query_type": "natural", "positives": ["p0006-f01"], "candidates": [{"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where's the main app bootstrap, which file sets up the server stuff?", "query_type": "natural", "positives": ["p0006-f01"], "candidates": [{"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "whers the app startup thing, the file that boots everything up??", "query_type": "messy", "positives": ["p0006-f01"], "candidates": [{"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why is my code getting undefined when it checks for a setting from the shell?", "query_type": "natural", "positives": ["p0006-f02"], "candidates": [{"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do I put a new setting so every part of the app can see its value without hunting it down?", "query_type": "natural", "positives": ["p0006-f02"], "candidates": [{"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "should I grab the port number straight from the system in each file or centralize it?", "query_type": "natural", "positives": ["p0006-f02"], "candidates": [{"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do i keep the port n stuff so i dont have to hunt it in every file lol", "query_type": "messy", "positives": ["p0006-f02"], "candidates": [{"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I added a new setting for the app but staging doesn't pick it up, what else do I need to update?", "query_type": "natural", "positives": ["p0006-f03"], "candidates": [{"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "new knob for the service, what files need touching so every deploy environment gets it?", "query_type": "natural", "positives": ["p0006-f03"], "candidates": [{"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "when I add a new config knob, do I also need to list it somewhere for the compose setup?", "query_type": "natural", "positives": ["p0006-f03"], "candidates": [{"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "new knob added, ci and local dont agree now, what do i touch", "query_type": "messy", "positives": ["p0006-f03"], "candidates": [{"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where are jobs for sending messages put before the sending processes grab them?", "query_type": "natural", "positives": ["p0006-f04"], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where does the message backlog live and which processes pick items off it?", "query_type": "natural", "positives": ["p0006-f04"], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "which file has the job queue setup, and where do the email sender processes read from?", "query_type": "natural", "positives": ["p0006-f04"], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "whre do the send jobs get stored, the thing that feeds the email/sms/push guys", "query_type": "messy", "positives": ["p0006-f04"], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "background processors keep crashing with a redis error after sitting idle, what's wrong?", "query_type": "natural", "positives": ["p0006-f05"], "candidates": [{"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "getting a retry limit error from redis even though nothing is failing, why?", "query_type": "natural", "positives": ["p0006-f05"], "candidates": [{"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why does my redis client setup need a special flag for the job library to stop exploding?", "query_type": "natural", "positives": ["p0006-f05"], "candidates": [{"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "redis keeps throwing max retries thing on my job runner, wtf", "query_type": "messy", "positives": ["p0006-f05"], "candidates": [{"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "failed sends aren't getting tried again, should I write my own loop for that?", "query_type": "natural", "positives": ["p0006-f06"], "candidates": [{"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how long to wait between re-sending a failed text before giving up?", "query_type": "natural", "positives": ["p0006-f06"], "candidates": [{"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "should my sms handler catch errors and loop itself or let the job runner do it?", "query_type": "natural", "positives": ["p0006-f06"], "candidates": [{"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "do i wrap the text sender in my own try loop or just throw, the failed ones", "query_type": "messy", "positives": ["p0006-f06"], "candidates": [{"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "the same bad phone numbers keep getting re-sent and we're burning through our twilio quota", "query_type": "natural", "positives": ["p0006-f07"], "candidates": [{"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "text messages to dead numbers keep hitting the carrier API over and over, how do I stop it?", "query_type": "natural", "positives": ["p0006-f07"], "candidates": [{"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "bad numbers keep getting retried by the queue, how to mark them as not worth another attempt?", "query_type": "natural", "positives": ["p0006-f07"], "candidates": [{"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "twilio keeps yelling about bad numbers and the queue just keeps going, stop that", "query_type": "messy", "positives": ["p0006-f07"], "candidates": [{"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do the code bits that talk to outside sending services live?", "query_type": "natural", "positives": ["p0006-f08"], "candidates": [{"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I want to plug in a new messaging service, what's the pattern for the wrapper?", "query_type": "natural", "positives": ["p0006-f08"], "candidates": [{"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do the smtp and fcm calls go, the layer between the app and each sender?", "query_type": "natural", "positives": ["p0006-f08"], "candidates": [{"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "adding a new way to send msgs, where do the vendor code bits go", "query_type": "messy", "positives": ["p0006-f08"], "candidates": [{"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "what's the full checklist to get a brand new way of notifying users working end to end?", "query_type": "natural", "positives": ["p0006-f09"], "candidates": [{"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my new delivery type never sends anything, what steps did I skip?", "query_type": "natural", "positives": ["p0006-f09"], "candidates": [{"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "list of steps for adding another messaging route, which endpoint code needs changes?", "query_type": "natural", "positives": ["p0006-f09"], "candidates": [{"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "steps to add a whole new notif type, what all do i touch", "query_type": "messy", "positives": ["p0006-f09"], "candidates": [{"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "push notification failed and nothing got sent by text or email afterward, why?", "query_type": "natural", "positives": ["p0006-f10"], "candidates": [{"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "when the app's first delivery method dies, what order does it try the others in?", "query_type": "natural", "positives": ["p0006-f10"], "candidates": [{"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why does a user sometimes get the email after the push failed but not right away?", "query_type": "natural", "positives": ["p0006-f10"], "candidates": [{"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "push fails then sms then email? what order does it go in, and when", "query_type": "messy", "positives": ["p0006-f10"], "candidates": [{"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "we're sending too many requests to the vendor and they keep bouncing us, how is throttling done here?", "query_type": "natural", "positives": ["p0006-f11"], "candidates": [{"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how does the app cap how fast messages go out across all instances?", "query_type": "natural", "positives": ["p0006-f11"], "candidates": [{"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where's the throttling code, does it store counts in redis?", "query_type": "natural", "positives": ["p0006-f11"], "candidates": [{"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how do we stop blasting the api too fast, the throttle thing", "query_type": "messy", "positives": ["p0006-f11"], "candidates": [{"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "under heavy load we blow past the send cap even though the check passed, races between processes", "query_type": "natural", "positives": ["p0006-f12"], "candidates": [{"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "two processes checked the count at the same time and both went through, how to fix?", "query_type": "natural", "positives": ["p0006-f12"], "candidates": [{"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "the limiter let through more sends than allowed when many jobs run at once, what's the proper fix?", "query_type": "natural", "positives": ["p0006-f12"], "candidates": [{"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "limiter lets too many thru when jobs run at the same time, race thing", "query_type": "messy", "positives": ["p0006-f12"], "candidates": [{"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my throttle test takes forever because it waits real seconds, how to speed it up?", "query_type": "natural", "positives": ["p0006-f13"], "candidates": [{"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "the test for slow-down window keeps flaking since it depends on wall clock, what to do?", "query_type": "natural", "positives": ["p0006-f13"], "candidates": [{"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "our rate test is slow and flaky, how should it fake passing time?", "query_type": "natural", "positives": ["p0006-f13"], "candidates": [{"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "test for the cap thing takes like 30 sec, how do i fake time in it", "query_type": "messy", "positives": ["p0006-f13"], "candidates": [{"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "texts to one phone number get rejected with too many requests when a burst comes in", "query_type": "natural", "positives": ["p0006-f14"], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "twilio returns 429 for the same number during spikes, what should the sms code do first?", "query_type": "natural", "positives": ["p0006-f14"], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why does my sms sender back off and retry later when a number is hit too often?", "query_type": "natural", "positives": ["p0006-f14"], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "twilio 429s on same number when bursts hit, what do i do in sms code", "query_type": "messy", "positives": ["p0006-f14"], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how do the html emails get built from my layout files with name placeholders filled in?", "query_type": "natural", "positives": ["p0006-f15"], "candidates": [{"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where does the code turn my email layout markup into final html for a user?", "query_type": "natural", "positives": ["p0006-f15"], "candidates": [{"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "which file turns the mjml layouts into html emails?", "query_type": "natural", "positives": ["p0006-f15"], "candidates": [{"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do the email html get made from the mjml stuff", "query_type": "messy", "positives": ["p0006-f15"], "candidates": [{"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "event loop lags badly when many emails go out, cpu pinned, why?", "query_type": "natural", "positives": ["p0006-f16"], "candidates": [{"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "throughput tanks and the server hangs during big email batches, profiler shows the same work repeated", "query_type": "natural", "positives": ["p0006-f16"], "candidates": [{"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "the mail build is eating cpu, should I keep building it on every send?", "query_type": "natural", "positives": ["p0006-f16"], "candidates": [{"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "server freezes when we send lots of mail, cpu is maxed, why", "query_type": "messy", "positives": ["p0006-f16"], "candidates": [{"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "a user put html tags in their name and it showed up as real markup in the email, how do I stop that?", "query_type": "natural", "positives": ["p0006-f17"], "candidates": [{"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "someone sent a script tag in the message body and it rendered live in the mail client, fix?", "query_type": "natural", "positives": ["p0006-f17"], "candidates": [{"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "emails render weird bold and links when a name has angle brackets, how to sanitize?", "query_type": "natural", "positives": ["p0006-f17"], "candidates": [{"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "user typed in name and it shows bold in the email lol, fix", "query_type": "messy", "positives": ["p0006-f17"], "candidates": [{"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I made a new mail layout file but nothing sends it, what else do I need?", "query_type": "natural", "positives": ["p0006-f18"], "candidates": [{"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "adding a new kind of message email, what files besides the layout do I touch?", "query_type": "natural", "positives": ["p0006-f18"], "candidates": [{"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I made a new mjml file, do I need a test for it too?", "query_type": "natural", "positives": ["p0006-f18"], "candidates": [{"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "made a new layout for signup mails, what do i add so it works", "query_type": "messy", "positives": ["p0006-f18"], "candidates": [{"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do the saved opt-in choices get stored and read back from the database?", "query_type": "natural", "positives": ["p0006-f19"], "candidates": [{"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "a user turned off sms but after restart it's on again, where's that data kept?", "query_type": "natural", "positives": ["p0006-f19"], "candidates": [{"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "which file does the database read and write for user notification settings?", "query_type": "natural", "positives": ["p0006-f19"], "candidates": [{"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where do user notif settings live in the db, the saving code", "query_type": "messy", "positives": ["p0006-f19"], "candidates": [{"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "user said stop messaging me on email but still got a job created for it, why?", "query_type": "natural", "positives": ["p0006-f20"], "candidates": [{"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "unsubscribed people still show up in the send backlog, where do I filter them out?", "query_type": "natural", "positives": ["p0006-f20"], "candidates": [{"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "we still generate send jobs for people who opted out, where's the filter?", "query_type": "natural", "positives": ["p0006-f20"], "candidates": [{"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "people who unsubbed still get jobs made, where's the check", "query_type": "messy", "positives": ["p0006-f20"], "candidates": [{"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I added a column but prod still errors on missing column, what do I run?", "query_type": "natural", "positives": ["p0006-f21"], "candidates": [{"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "changed the table definition and my running db doesn't have the new field, how do I sync?", "query_type": "natural", "positives": ["p0006-f21"], "candidates": [{"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "is there a tool that auto-updates the db structure when I change it?", "query_type": "natural", "positives": ["p0006-f21"], "candidates": [{"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "added a col and prod says no such column, how do i update the db", "query_type": "messy", "positives": ["p0006-f21"], "candidates": [{"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "security scanner flagged sql injection in the opt-in lookup, what's the fix?", "query_type": "natural", "positives": ["p0006-f22"], "candidates": [{"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "someone could pass a weird string in the api and break the db call, how do I make it safe?", "query_type": "natural", "positives": ["p0006-f22"], "candidates": [{"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "a user id from the request goes straight into an SQL string, is that safe?", "query_type": "natural", "positives": ["p0006-f22"], "candidates": [{"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "sql injection risk where we build the query with user stuff", "query_type": "messy", "positives": ["p0006-f22"], "candidates": [{"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how does a client see or change which notification types are turned on for an account?", "query_type": "natural", "positives": ["p0006-f23"], "candidates": [{"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "endpoint for toggling email or sms for an account, which file handles it?", "query_type": "natural", "positives": ["p0006-f23"], "candidates": [{"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where's the endpoint that flips a person's notification settings?", "query_type": "natural", "positives": ["p0006-f23"], "candidates": [{"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "endpoint to turn sms on/off for someone, where is it", "query_type": "messy", "positives": ["p0006-f23"], "candidates": [{"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I added a field to my payload but the saved record never has it, nothing errors", "query_type": "natural", "positives": ["p0006-f24"], "candidates": [{"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "new property I send gets dropped with no warning, why?", "query_type": "natural", "positives": ["p0006-f24"], "candidates": [{"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "new key in the send call vanishes on the server side, where do I declare it?", "query_type": "natural", "positives": ["p0006-f24"], "candidates": [{"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "i sent a new param in the post and it just disappears server side", "query_type": "messy", "positives": ["p0006-f24"], "candidates": [{"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "users get the same text twice when my HTTP call times out and I resend, how to prevent?", "query_type": "natural", "positives": ["p0006-f25"], "candidates": [{"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "after a network hiccup the same alert shows up multiple times, how do I make sends safe to repeat?", "query_type": "natural", "positives": ["p0006-f25"], "candidates": [{"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "double sends happen when the client resubmits after a timeout, what header should I add?", "query_type": "natural", "positives": ["p0006-f25"], "candidates": [{"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "same msg sent twice when my call times out, how to stop dupes", "query_type": "messy", "positives": ["p0006-f25"], "candidates": [{"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "a user's phone stopped getting pushes entirely even though the app is installed, what's happening?", "query_type": "natural", "positives": ["p0006-f26"], "candidates": [{"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "push errors pile up in logs for one device forever, what should the code do?", "query_type": "natural", "positives": ["p0006-f26"], "candidates": [{"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why do pushes to one device keep failing with an error from the push service after reinstall?", "query_type": "natural", "positives": ["p0006-f26"], "candidates": [{"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "push to one phone keeps erroring forever after they reinstalled app", "query_type": "messy", "positives": ["p0006-f26"], "candidates": [{"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "email sending falls over during spikes with too many open sessions to the mail server", "query_type": "natural", "positives": ["p0006-f27"], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "mail server starts refusing us at peak times, we're opening lots of sockets, fix?", "query_type": "natural", "positives": ["p0006-f27"], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "should each email job open its own mail session or share one?", "query_type": "natural", "positives": ["p0006-f27"], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "mail server says too many logins when we blast emails, why", "query_type": "messy", "positives": ["p0006-f27"], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how do I get the full app plus its databases running on my laptop in one command?", "query_type": "natural", "positives": ["p0006-f28"], "candidates": [{"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I want a one-liner to bring up everything for dev, what do I run?", "query_type": "natural", "positives": ["p0006-f28"], "candidates": [{"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "is there a way to start the app and its supporting services together for local testing?", "query_type": "natural", "positives": ["p0006-f28"], "candidates": [{"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how do i run everything on my machine at once, db and all", "query_type": "messy", "positives": ["p0006-f28"], "candidates": [{"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "the container is huge with dev packages and test tooling inside, how to slim it?", "query_type": "natural", "positives": ["p0006-f29"], "candidates": [{"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "what version of the runtime does the build use, and why is the image so big?", "query_type": "natural", "positives": ["p0006-f29"], "candidates": [{"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why does my image contain typescript and jest, how to keep only built files?", "query_type": "natural", "positives": ["p0006-f29"], "candidates": [{"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "image is massive, has ts compiler in it, how slim", "query_type": "messy", "positives": ["p0006-f29"], "candidates": [{"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my PR got blocked by something automated before review, what checks run?", "query_type": "natural", "positives": ["p0006-f30"], "candidates": [{"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "what automated checks run when someone opens a merge request?", "query_type": "natural", "positives": ["p0006-f30"], "candidates": [{"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "which pipeline runs checks and tests on my branch before merge?", "query_type": "natural", "positives": ["p0006-f30"], "candidates": [{"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "ci failing on my branch, what does it even run on each push", "query_type": "messy", "positives": ["p0006-f30"], "candidates": [{"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my api test for the send route is flaky due to port collisions when running in parallel, what to do?", "query_type": "natural", "positives": ["p0006-f31"], "candidates": [{"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "tests fail with address in use when they run together, how do I test the HTTP layer without a real socket?", "query_type": "natural", "positives": ["p0006-f31"], "candidates": [{"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "how do I hit the send route in a test without starting a listener?", "query_type": "natural", "positives": ["p0006-f31"], "candidates": [{"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "tests crash port already in use when running in parallel, how to test route", "query_type": "messy", "positives": ["p0006-f31"], "candidates": [{"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "tests that enqueue jobs fail in CI with connection refused, but pass locally", "query_type": "natural", "positives": ["p0006-f32"], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "pipeline tests hang or error only on the runner, something about a missing cache server", "query_type": "natural", "positives": ["p0006-f32"], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why do my queue tests error in github actions but work on my laptop?", "query_type": "natural", "positives": ["p0006-f32"], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "ci tests die connecting to something, works on my pc", "query_type": "messy", "positives": ["p0006-f32"], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "I accidentally printed the sms api key in the server log, what's the right way to handle secrets?", "query_type": "natural", "positives": ["p0006-f33"], "candidates": [{"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "where should the vendor keys live so they never show up in a commit?", "query_type": "natural", "positives": ["p0006-f33"], "candidates": [{"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "what do I put in the example env file for the messaging key so teammates don't see real ones?", "query_type": "natural", "positives": ["p0006-f33"], "candidates": [{"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "dont want api keys in code or logs, where do they go", "query_type": "messy", "positives": ["p0006-f33"], "candidates": [{"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "eslint config file won't load, says require is not defined, why?", "query_type": "natural", "positives": ["p0006-f34"], "candidates": [{"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why does the lint config throw on import syntax in this repo?", "query_type": "natural", "positives": ["p0006-f34"], "candidates": [{"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why is the lint config a .cjs file and the compiler so picky about nulls?", "query_type": "natural", "positives": ["p0006-f34"], "candidates": [{"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "lint config errors cause module stuff, and ts nulls getting mad", "query_type": "messy", "positives": ["p0006-f34"], "candidates": [{"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my cache counts look wrong, the worker reports zero hits but the web server shows many", "query_type": "natural", "positives": ["p0006-f35"], "candidates": [{"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "stats I store in memory show different numbers depending on which box I ask", "query_type": "natural", "positives": ["p0006-f35"], "candidates": [{"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "random"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "why doesn't my in-process cache work when the sending side runs elsewhere?", "query_type": "natural", "positives": ["p0006-f35"], "candidates": [{"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "cache hits zero on the send side, works on web side, why", "query_type": "messy", "positives": ["p0006-f35"], "candidates": [{"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "bullmq worker crashes with a redis error and I can't find where the queue is created", "query_type": "natural", "positives": ["p0006-f04", "p0006-f05"], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "two sms senders keep hitting the limit at once even with a bucket check in place", "query_type": "natural", "positives": ["p0006-f12", "p0006-f14"], "candidates": [{"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "opted-out users still get jobs, where are their settings read from", "query_type": "natural", "positives": ["p0006-f19", "p0006-f20"], "candidates": [{"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "retry loop keeps sending to dead numbers, do I stop it in the worker or the queue", "query_type": "natural", "positives": ["p0006-f06", "p0006-f07"], "candidates": [{"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "adding a fallback channel, what do I edit and what order does it fall back in", "query_type": "natural", "positives": ["p0006-f09", "p0006-f10"], "candidates": [{"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f23", "text": "The preferences HTTP API (read and update a user's channel opt-ins) is in src/routes/preferences.ts.", "anchors": ["src/routes/preferences.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f11", "text": "Rate limiting is implemented as a Redis-backed token bucket in src/ratelimit/tokenBucket.ts.", "anchors": ["src/ratelimit/tokenBucket.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "my idempotency key I added to the request body gets dropped, why", "query_type": "natural", "positives": ["p0006-f24", "p0006-f25"], "candidates": [{"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "docker compose brings up the app with real api keys in the env file, is that safe", "query_type": "messy", "positives": ["p0006-f28", "p0006-f33"], "candidates": [{"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "template cache is empty in the email worker even though I cache it in render, why", "query_type": "natural", "positives": ["p0006-f16", "p0006-f35"], "candidates": [{"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f10", "text": "Channel fallback (e.g. push fails, then SMS, then email) is driven by the ordering described in docs/channel-fallback.md, and fallback is only attempted after retries on the primary channel are exhausted.", "anchors": ["docs/channel-fallback.md", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f34", "text": "Lint rules are in eslintrc.cjs (CommonJS because package.json is an ES module project), and TypeScript strict mode is enabled in tsconfig.json.", "anchors": ["eslintrc.cjs", "tsconfig.json"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "all good", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f17", "text": "Template variables must be HTML-escaped when substituted into MJML output to prevent injection from user-supplied data in notification payloads.", "anchors": ["src/templates/render.ts", "test/render.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f29", "text": "The Docker image targets Node.js 20 and uses a multi-stage build so only compiled output and production dependencies ship in the final image.", "anchors": ["Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0006-f20", "text": "Preferences are checked at enqueue time in the notifications route, so opted-out channels never produce queue jobs.", "anchors": ["src/routes/notifications.ts", "src/db/preferences.repo.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "do the thing", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "sounds right", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f22", "text": "Always use parameterized queries in the repo layer; user ids and channel names come from request input.", "anchors": ["src/db/preferences.repo.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0006-f15", "text": "Template rendering lives in src/templates/render.ts, which compiles MJML files like src/templates/welcome.mjml into HTML with variable substitution.", "anchors": ["src/templates/render.ts", "src/templates/welcome.mjml"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "fine by me", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f04", "text": "The BullMQ delivery queue is defined in src/queues/delivery.queue.ts; the per-channel workers (email, sms, push) in src/workers/ consume jobs from it.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f30", "text": "CI is defined in github/workflows/ci.yml and runs lint, type-check and tests on pull requests.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f06", "text": "Retries are handled by BullMQ job attempts with exponential backoff rather than custom retry loops in workers, so workers should throw to trigger a retry.", "anchors": ["src/queues/delivery.queue.ts", "src/workers/sms.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f08", "text": "Each delivery channel has a thin provider adapter in src/providers/ (smtp, twilio, fcm); new channels should add an adapter there plus a matching worker.", "anchors": ["src/providers/smtp.ts", "src/providers/twilio.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f09", "text": "To add a new channel: create a provider in src/providers/, a worker in src/workers/, enqueue to it from the notifications route, and update the fallback order documented in docs/channel-fallback.md.", "anchors": ["src/routes/notifications.ts", "docs/channel-fallback.md"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "let's do that", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f26", "text": "FCM push tokens that return unregistered/not-found errors must be removed or marked invalid, otherwise every future push to that user fails.", "anchors": ["src/providers/fcm.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f35", "text": "Workers run as separate processes from the HTTP server in production, so in-memory state like template caches or counters is not shared between them.", "anchors": ["src/workers/email.worker.ts", "src/workers/push.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f28", "text": "Run the whole stack locally with docker-compose up, which starts Redis and PostgreSQL alongside the app using values from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "same as before", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f05", "text": "BullMQ requires its Redis connection to be created with maxRetriesPerRequest set to null; otherwise workers throw on blocking commands.", "anchors": ["src/queues/delivery.queue.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f01", "text": "HTTP entrypoint is src/server.ts, which builds the Fastify instance and registers the route modules from src/routes/ (notifications and preferences).", "anchors": ["src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "cool", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f33", "text": "Provider credentials for Twilio, SMTP and FCM must never be hardcoded or logged; they come from config and are placeholder values in env.example.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f14", "text": "Twilio enforces per-number message throughput, so the SMS worker must acquire a token from the bucket before calling the provider and requeue with delay if none is available.", "anchors": ["src/workers/sms.worker.ts", "src/ratelimit/tokenBucket.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f24", "text": "Request bodies on the notification route are validated with Fastify JSON schemas; new fields must be added to the schema or they are stripped silently.", "anchors": ["src/routes/notifications.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f02", "text": "All environment variable parsing and defaults live in src/config.ts; other modules should import config from there rather than reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f18", "text": "To add a new email template, drop a .mjml file in src/templates/ and add a render test case in test/render.test.ts covering its required variables.", "anchors": ["src/templates/welcome.mjml", "test/render.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f19", "text": "User channel preferences are persisted via src/db/preferences.repo.ts, backed by the preferences table defined in src/db/schema.sql.", "anchors": ["src/db/preferences.repo.ts", "src/db/schema.sql"], "label": 0, "source": "random"}]} {"project_id": "p0006", "query": "great, go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0006-f27", "text": "SMTP connections should be pooled and reused; creating a new transport per job exhausts the provider's connection limit under bursts.", "anchors": ["src/providers/smtp.ts", "src/workers/email.worker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f16", "text": "MJML compilation is CPU-heavy and synchronous; cache compiled templates in render.ts instead of recompiling per notification, or the event loop stalls under load.", "anchors": ["src/templates/render.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f07", "text": "Providers that return permanent failures (e.g. invalid phone number from Twilio) must be wrapped as unrecoverable errors, or BullMQ will keep retrying and burn rate-limit budget.", "anchors": ["src/workers/sms.worker.ts", "src/providers/twilio.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f32", "text": "Tests that touch Redis or BullMQ need a reachable Redis instance, so CI must provide a Redis service container.", "anchors": ["github/workflows/ci.yml", "test/notifications.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f12", "text": "Token bucket refill and consume must happen atomically (single Lua script); doing read-then-write from Node lets concurrent workers overspend tokens.", "anchors": ["src/ratelimit/tokenBucket.ts", "test/tokenBucket.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f25", "text": "Notification requests should carry an idempotency key; without it, client retries after a timeout enqueue duplicate deliveries.", "anchors": ["src/routes/notifications.ts", "src/queues/delivery.queue.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f21", "text": "Schema changes are made by editing src/db/schema.sql directly; there is no migration runner, so existing databases need a manual ALTER applied.", "anchors": ["src/db/schema.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0006-f31", "text": "Integration tests for the notification endpoint use Fastify's inject() against the built app instead of opening a real port.", "anchors": ["test/notifications.test.ts", "src/server.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f13", "text": "Token bucket tests rely on controlling time rather than sleeping; advance the injected clock to test refill behavior.", "anchors": ["test/tokenBucket.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0006-f03", "text": "When adding a new env var, add it to src/config.ts and also document it in env.example so docker-compose and CI setups stay in sync.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where does the app boot and hook all the pieces up, is gameplay code in there too?", "query_type": "natural", "positives": ["p0029-f01"], "candidates": [{"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why is there no gameplay code in the startup file, where do I add a new boot step?", "query_type": "natural", "positives": ["p0029-f01"], "candidates": [{"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where does the boot file connect the modules, should I put game rules in there?", "query_type": "natural", "positives": ["p0029-f01"], "candidates": [{"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "that boot file thing, is gameplay stuff in there or nah", "query_type": "messy", "positives": ["p0029-f01"], "candidates": [{"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "my settings change does nothing after restart, where do values get loaded?", "query_type": "natural", "positives": ["p0029-f02"], "candidates": [{"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where do fallback values for the port and tick rate get decided?", "query_type": "natural", "positives": ["p0029-f02"], "candidates": [{"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "getting undefined when I grab a setting in a random file, should I pull it from somewhere else?", "query_type": "natural", "positives": ["p0029-f02"], "candidates": [{"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "the setting lookups are everywhere, where do they actually live", "query_type": "messy", "positives": ["p0029-f02"], "candidates": [{"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "I added a setting but the container doesn't see it, what else do I need to update?", "query_type": "natural", "positives": ["p0029-f03"], "candidates": [{"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "new flag works on my laptop but staging ignores it, what am I missing?", "query_type": "natural", "positives": ["p0029-f03"], "candidates": [{"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "added a new variable to my app, do I need to register it somewhere besides the code?", "query_type": "natural", "positives": ["p0029-f03"], "candidates": [{"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "new env thing not showing up in my docker run, what files need it", "query_type": "messy", "positives": ["p0029-f03"], "candidates": [{"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where should I put a new packet type the client will send? I don't want it scattered", "query_type": "natural", "positives": ["p0029-f04"], "candidates": [{"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "adding a new network packet, which file holds the byte layouts?", "query_type": "natural", "positives": ["p0029-f04"], "candidates": [{"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "I need a new kind of msg between client and server, where does the schema go in the socket handler?", "query_type": "natural", "positives": ["p0029-f04"], "candidates": [{"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "new packet type, where do i put it, the socket file or somewhere else", "query_type": "messy", "positives": ["p0029-f04"], "candidates": [{"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "I changed the byte layout and old builds started acting weird with no error, what should I have done?", "query_type": "natural", "positives": ["p0029-f05"], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "players on the old build show garbage positions after my deploy", "query_type": "natural", "positives": ["p0029-f05"], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "changed how a packet is laid out, do I need to touch a version number anywhere?", "query_type": "natural", "positives": ["p0029-f05"], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "layout change, old clients garbage, need to bump something?", "query_type": "messy", "positives": ["p0029-f05"], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "server process died after some peer sent garbage bytes, how do I guard against that?", "query_type": "natural", "positives": ["p0029-f06"], "candidates": [{"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "a weird binary payload from a browser took down the socket loop, how do I check size before parsing?", "query_type": "natural", "positives": ["p0029-f06"], "candidates": [{"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "bad frames from a hacked client crash the server, add checks before touching fields?", "query_type": "natural", "positives": ["p0029-f06"], "candidates": [{"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "garbage packet crashed the whole thing again, need checks first", "query_type": "messy", "positives": ["p0029-f06"], "candidates": [{"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where is the code that accepts new sockets and authenticates them before they can play?", "query_type": "natural", "positives": ["p0029-f07"], "candidates": [{"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "players can't join after the initial hello, where does the join flow happen?", "query_type": "natural", "positives": ["p0029-f07"], "candidates": [{"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where's the login-on-connect logic and the code that forwards inputs to the right game?", "query_type": "natural", "positives": ["p0029-f07"], "candidates": [{"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "that socket file, where's the auth part and input forwarding", "query_type": "messy", "positives": ["p0029-f07"], "candidates": [{"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "people who unplug their wifi stay visible to everyone for ages, why?", "query_type": "natural", "positives": ["p0029-f08"], "candidates": [{"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "a disconnected guy's character keeps standing there for a minute, how do we drop them faster?", "query_type": "natural", "positives": ["p0029-f08"], "candidates": [{"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why do dead sockets linger, how do we notice a peer vanished?", "query_type": "natural", "positives": ["p0029-f08"], "candidates": [{"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ghost dudes stay after wifi drops, fix?", "query_type": "messy", "positives": ["p0029-f08"], "candidates": [{"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "can a cheater just send their own coordinates and teleport?", "query_type": "natural", "positives": ["p0029-f09"], "candidates": [{"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "someone modded the client to report hits they didn't land, how do we stop that?", "query_type": "natural", "positives": ["p0029-f09"], "candidates": [{"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "should the aim packet carry where I hit, or does the backend figure that out?", "query_type": "natural", "positives": ["p0029-f09"], "candidates": [{"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "cheaters sending fake x y, how to block", "query_type": "messy", "positives": ["p0029-f09"], "candidates": [{"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where is the code that packs world data into what gets sent to each player?", "query_type": "natural", "positives": ["p0029-f10"], "candidates": [{"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "bandwidth is high, where's the logic that only sends what changed?", "query_type": "natural", "positives": ["p0029-f10"], "candidates": [{"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "which module turns the game world into outgoing payloads, is it mixed with physics?", "query_type": "natural", "positives": ["p0029-f10"], "candidates": [{"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "the outgoing data code, bandwidth hog, where is it", "query_type": "messy", "positives": ["p0029-f10"], "candidates": [{"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "players randomly freeze or teleport after lag spikes, desynced state", "query_type": "natural", "positives": ["p0029-f11"], "candidates": [{"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "after a packet loss burst the world looks wrong until reconnect, why?", "query_type": "natural", "positives": ["p0029-f11"], "candidates": [{"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "what happens if a client's last confirmed frame is too old to diff from? stuck forever?", "query_type": "natural", "positives": ["p0029-f11"], "candidates": [{"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "desync after lag, world wrong, need fallback?", "query_type": "messy", "positives": ["p0029-f11"], "candidates": [{"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why don't we just update the world whenever a packet comes in? why a loop on a timer?", "query_type": "natural", "positives": ["p0029-f12"], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why do replays and hits differ based on how fast packets get in?", "query_type": "natural", "positives": ["p0029-f12"], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why is the game loop on a fixed schedule instead of reacting to input messages?", "query_type": "natural", "positives": ["p0029-f12"], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why loop on a clock instead of packet-driven, confused", "query_type": "messy", "positives": ["p0029-f12"], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "my unit test passes sometimes and fails other times with movement, time-related?", "query_type": "natural", "positives": ["p0029-f13"], "candidates": [{"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "physics results differ between runs even with the same inputs, why?", "query_type": "natural", "positives": ["p0029-f13"], "candidates": [{"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why are my sim tests flaky when I use the real clock?", "query_type": "natural", "positives": ["p0029-f13"], "candidates": [{"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "tests flaky movement timing, fix?", "query_type": "messy", "positives": ["p0029-f13"], "candidates": [{"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "when the server gets slow it keeps trying to catch up and gets slower and slower, why?", "query_type": "natural", "positives": ["p0029-f14"], "candidates": [{"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "a tick took too long and then the server freezes for seconds afterward, why?", "query_type": "natural", "positives": ["p0029-f14"], "candidates": [{"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how many missed frames should the loop simulate in one go when it falls behind?", "query_type": "natural", "positives": ["p0029-f14"], "candidates": [{"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "server melts when cpu spikes, runs stacking updates", "query_type": "messy", "positives": ["p0029-f14"], "candidates": [{"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "my loop test takes forever because it sleeps real seconds, how do I speed it up?", "query_type": "natural", "positives": ["p0029-f15"], "candidates": [{"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how do I test a loop that runs every 16ms without actually waiting?", "query_type": "natural", "positives": ["p0029-f15"], "candidates": [{"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how to write a test for timer-based code that advances the clock on demand in vitest?", "query_type": "natural", "positives": ["p0029-f15"], "candidates": [{"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "tests for the loop are slow, sleep stuff, help", "query_type": "messy", "positives": ["p0029-f15"], "candidates": [{"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where is the main game state object, the one holding bullets and where people stand?", "query_type": "natural", "positives": ["p0029-f16"], "candidates": [{"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where do I add a new kind of entity to the arena data?", "query_type": "natural", "positives": ["p0029-f16"], "candidates": [{"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "which file holds the live object list and the per-frame advance function?", "query_type": "natural", "positives": ["p0029-f16"], "candidates": [{"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "game state file, bullets and everything, where", "query_type": "messy", "positives": ["p0029-f16"], "candidates": [{"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why does my character clip through walls when moving fast?", "query_type": "natural", "positives": ["p0029-f17"], "candidates": [{"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where's the code that moves things and stops them at walls?", "query_type": "natural", "positives": ["p0029-f17"], "candidates": [{"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "bullets not stopping at obstacles, where's the detection code for map shapes?", "query_type": "natural", "positives": ["p0029-f17"], "candidates": [{"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "character walks through the wall at speed, where is the stop logic", "query_type": "messy", "positives": ["p0029-f17"], "candidates": [{"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "shots that look like they hit don't register, where's the raycast against enemy boxes?", "query_type": "natural", "positives": ["p0029-f18"], "candidates": [{"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "instant-hit weapon math, where does the bullet line check against hurtboxes live?", "query_type": "natural", "positives": ["p0029-f18"], "candidates": [{"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where does the ray test happen for a gun shot?", "query_type": "natural", "positives": ["p0029-f18"], "candidates": [{"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "that instant gun hit check, where", "query_type": "messy", "positives": ["p0029-f18"], "candidates": [{"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "shots hit where enemies were on my screen but not on the server, how is that handled?", "query_type": "natural", "positives": ["p0029-f19"], "candidates": [{"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "high-latency shooters see hits go through walls, what's the approach to fix that?", "query_type": "natural", "positives": ["p0029-f19"], "candidates": [{"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how does the server know where the target was when I pulled the trigger?", "query_type": "natural", "positives": ["p0029-f19"], "candidates": [{"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "shots feel wrong with lag, the history thing", "query_type": "messy", "positives": ["p0029-f19"], "candidates": [{"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why can someone with bad internet hit enemies who've ducked behind cover?", "query_type": "natural", "positives": ["p0029-f20"], "candidates": [{"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "laggy players seem to shoot around corners, is there a limit on how far back the server looks?", "query_type": "natural", "positives": ["p0029-f20"], "candidates": [{"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "is there a maximum on how far back the server looks for a hit? something's off for 400ms pings", "query_type": "natural", "positives": ["p0029-f20"], "candidates": [{"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "laggy guys shooting after cover, limit?", "query_type": "messy", "positives": ["p0029-f20"], "candidates": [{"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "hits land a frame late or early exactly on certain timestamps, weird edge case", "query_type": "natural", "positives": ["p0029-f21"], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "when the shot time matches a snapshot exactly, the hit is off, why?", "query_type": "natural", "positives": ["p0029-f21"], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why do shots at exact tick boundaries misfire in hit tests?", "query_type": "natural", "positives": ["p0029-f21"], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "edge timing bug where the hit uses the wrong frame, fix?", "query_type": "messy", "positives": ["p0029-f21"], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "I added a new rifle and want a regression test, how do I set up fake players?", "query_type": "natural", "positives": ["p0029-f22"], "candidates": [{"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how are the existing shot tests structured, I want to add a case for a shotgun?", "query_type": "natural", "positives": ["p0029-f22"], "candidates": [{"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "need to add test coverage for a new gun with a headshot zone, where do tests live?", "query_type": "natural", "positives": ["p0029-f22"], "candidates": [{"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "weapon test cases, add a shotgun one?", "query_type": "messy", "positives": ["p0029-f22"], "candidates": [{"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "what object holds one game session from countdown to end screen?", "query_type": "natural", "positives": ["p0029-f23"], "candidates": [{"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where's the code for the phases of a single game lobby and who is in it?", "query_type": "natural", "positives": ["p0029-f23"], "candidates": [{"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "which file owns a single arena session with its loop and tracks who's playing?", "query_type": "natural", "positives": ["p0029-f23"], "candidates": [{"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "game session phases, countdown then ended, where", "query_type": "messy", "positives": ["p0029-f23"], "candidates": [{"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "after games end the server RAM keeps climbing and CPU stays busy", "query_type": "natural", "positives": ["p0029-f24"], "candidates": [{"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "old games keep running in the background after everyone left, why?", "query_type": "natural", "positives": ["p0029-f24"], "candidates": [{"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why does memory keep growing when games finish, do I need to dispose stuff?", "query_type": "natural", "positives": ["p0029-f24"], "candidates": [{"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "leak after games end, cpu stays high, fix?", "query_type": "messy", "positives": ["p0029-f24"], "candidates": [{"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where's the code that pairs people waiting for a game and where is the waiting list stored?", "query_type": "natural", "positives": ["p0029-f25"], "candidates": [{"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "who decides which lobby a searching player lands in, and where does the queue live?", "query_type": "natural", "positives": ["p0029-f25"], "candidates": [{"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where is the pairing logic that uses the cache for the waiting list?", "query_type": "natural", "positives": ["p0029-f25"], "candidates": [{"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "matching queue thing, where stored", "query_type": "messy", "positives": ["p0029-f25"], "candidates": [{"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "two game servers sometimes both assign the same person to separate games, how to prevent?", "query_type": "natural", "positives": ["p0029-f26"], "candidates": [{"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "race condition in the lobby join, a player shows up in two games, fix?", "query_type": "natural", "positives": ["p0029-f26"], "candidates": [{"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how to make taking someone off the waiting list all-or-nothing across nodes?", "query_type": "natural", "positives": ["p0029-f26"], "candidates": [{"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "dupe games when scaling to two boxes, fix", "query_type": "messy", "positives": ["p0029-f26"], "candidates": [{"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "do I need to spin up a database to run the lobby tests locally?", "query_type": "natural", "positives": ["p0029-f27"], "candidates": [{"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "tests fail on my machine with connection refused, how do I run the pairing checks without a db?", "query_type": "natural", "positives": ["p0029-f27"], "candidates": [{"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "run the lobby test suite offline without starting extra services, is that possible?", "query_type": "natural", "positives": ["p0029-f27"], "candidates": [{"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "lobby tests failing w/o redis running, how", "query_type": "messy", "positives": ["p0029-f27"], "candidates": [{"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "too many open connections to the cache server, does each file make its own?", "query_type": "natural", "positives": ["p0029-f28"], "candidates": [{"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "our cache client is instantiated in five places, how do we consolidate?", "query_type": "natural", "positives": ["p0029-f28"], "candidates": [{"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where does the single cache handle get created, I keep finding duplicates", "query_type": "natural", "positives": ["p0029-f28"], "candidates": [{"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "redis conns everywhere, where is the one that should be used", "query_type": "messy", "positives": ["p0029-f28"], "candidates": [{"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "server dies whenever the cache box reboots, the stack trace mentions an error event", "query_type": "natural", "positives": ["p0029-f29"], "candidates": [{"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "node app exits when the cache service bounces with an error event message, how do I keep it alive?", "query_type": "natural", "positives": ["p0029-f29"], "candidates": [{"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "keep the server alive when the cache goes down for a moment, what's needed?", "query_type": "natural", "positives": ["p0029-f29"], "candidates": [{"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "cache restarts kill node, fix?", "query_type": "messy", "positives": ["p0029-f29"], "candidates": [{"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "server lags badly once I turned on debug output in the game loop", "query_type": "natural", "positives": ["p0029-f30"], "candidates": [{"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why is my frame time spiking when I print stuff every frame?", "query_type": "natural", "positives": ["p0029-f30"], "candidates": [{"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "what's the right place to emit log lines instead of printing to stdout?", "query_type": "natural", "positives": ["p0029-f30"], "candidates": [{"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "print statements everywhere slow the thing down, what to use", "query_type": "messy", "positives": ["p0029-f30"], "candidates": [{"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how do I simulate a hundred players connecting to see if the loop holds up?", "query_type": "natural", "positives": ["p0029-f31"], "candidates": [{"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "want to stress the game with fake players to see tick times, anything prebuilt?", "query_type": "natural", "positives": ["p0029-f31"], "candidates": [{"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "bot swarm script to benchmark the loop under crowds, where is it?", "query_type": "natural", "positives": ["p0029-f31"], "candidates": [{"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "fake players stress test thing, where", "query_type": "messy", "positives": ["p0029-f31"], "candidates": [{"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how do I get the whole stack running on my laptop with one command?", "query_type": "natural", "positives": ["p0029-f32"], "candidates": [{"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "new dev setup, what command boots the app and its cache dependency?", "query_type": "natural", "positives": ["p0029-f32"], "candidates": [{"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how do I start everything for local work with containers?", "query_type": "natural", "positives": ["p0029-f32"], "candidates": [{"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "docker up for the dev env, what config to copy", "query_type": "messy", "positives": ["p0029-f32"], "candidates": [{"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "image is huge because it ships the compiler, how do I slim it?", "query_type": "natural", "positives": ["p0029-f33"], "candidates": [{"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why does production crash with ts-node not found in the image?", "query_type": "natural", "positives": ["p0029-f33"], "candidates": [{"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how do I make my build image smaller and skip dev dependencies?", "query_type": "natural", "positives": ["p0029-f33"], "candidates": [{"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "docker image bloated, fix", "query_type": "messy", "positives": ["p0029-f33"], "candidates": [{"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "my PR got red without me changing tests, what automated checks run on it?", "query_type": "natural", "positives": ["p0029-f34"], "candidates": [{"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "what runs automatically when I open a pull request, is it type errors and unit tests?", "query_type": "natural", "positives": ["p0029-f34"], "candidates": [{"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "PRs fail with type errors in the pipeline, where's that config?", "query_type": "natural", "positives": ["p0029-f34"], "candidates": [{"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ci red on my branch, what gets checked", "query_type": "messy", "positives": ["p0029-f34"], "candidates": [{"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "why are the tick and send rates set the way they are, is there a write-up?", "query_type": "natural", "positives": ["p0029-f35"], "candidates": [{"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "I bumped the send rate, what other notes should I update too?", "query_type": "natural", "positives": ["p0029-f35"], "candidates": [{"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "where do I find the reasoning behind the input delay and send frequency choices?", "query_type": "natural", "positives": ["p0029-f35"], "candidates": [{"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "send rate tweak, docs got out of date, where", "query_type": "messy", "positives": ["p0029-f35"], "candidates": [{"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "client sends hit coordinates, do I hitscan against those or the server state?", "query_type": "natural", "positives": ["p0029-f09", "p0029-f18"], "candidates": [{"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "bumping the protocol version and validating frames, where do both of those go?", "query_type": "natural", "positives": ["p0029-f05", "p0029-f06"], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f04", "text": "Wire message definitions and encode/decode functions are centralized in src/net/protocol.ts; add new message types there rather than in wsServer.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "tests of the fixed loop, should I use real time delta or a fixed one?", "query_type": "natural", "positives": ["p0029-f12", "p0029-f13"], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "how far back can a lagged shot look, and how is the rewind actually computed?", "query_type": "natural", "positives": ["p0029-f19", "p0029-f20"], "candidates": [{"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "two servers racing to pull people from the waiting list, how do I stop that?", "query_type": "natural", "positives": ["p0029-f25", "p0029-f26"], "candidates": [{"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "shared cache client and crashes when it restarts, what's the setup?", "query_type": "natural", "positives": ["p0029-f28", "p0029-f29"], "candidates": [{"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "add a new env var and parse it into the settings object, where?", "query_type": "natural", "positives": ["p0029-f02", "p0029-f03"], "candidates": [{"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f34", "text": "CI runs type-check and the Vitest suite on pushes and PRs via the workflow file.", "anchors": ["github/workflows/ci.yml", "vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f15", "text": "To test tick behavior, drive the loop manually with Vitest fake timers instead of waiting real time; see test/tick.test.ts for the pattern.", "anchors": ["test/tick.test.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ghost players linger after disconnect and rooms keep ticking, where does cleanup go?", "query_type": "natural", "positives": ["p0029-f08", "p0029-f24"], "candidates": [{"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "snapshot diffs failing after a late ack, is the fallback in the snapshot module?", "query_type": "natural", "positives": ["p0029-f10", "p0029-f11"], "candidates": [{"fact_id": "p0029-f10", "text": "Snapshot building and delta compression for state sent to clients is in src/net/snapshot.ts, separate from the simulation that produces the state.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f19", "text": "Lag compensation rewinds target positions to the shooter's perceived time using a ring buffer of past world states instead of extrapolating the shooter forward.", "anchors": ["src/sim/lagCompensation.ts", "docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ok", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "yep", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f22", "text": "Hit detection tests build a small world with players at known positions and call hitscan directly; extend test/hitscan.test.ts for new weapon or hitbox cases.", "anchors": ["test/hitscan.test.ts", "src/sim/hitscan.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f01", "text": "The process entrypoint src/index.ts wires config, the Redis client, the matchmaker and the WebSocket server together; game logic does not live here.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f23", "text": "A Room owns one running match: its World, tick loop, connected players and match lifecycle (warmup, live, finished) in src/match/room.ts.", "anchors": ["src/match/room.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f07", "text": "The WebSocket connection lifecycle (upgrade, auth handshake, heartbeats, routing inputs to rooms) is implemented in src/net/wsServer.ts.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "do it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f18", "text": "Hitscan ray casting against player hitboxes is in src/sim/hitscan.ts, and it is called with world state already rewound by lagCompensation.", "anchors": ["src/sim/hitscan.ts", "src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f16", "text": "The authoritative world state (players, projectiles, spawn points) and its per-tick update entry point live in src/sim/world.ts.", "anchors": ["src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f17", "text": "Movement integration and collision against arena geometry are in src/sim/physics.ts; it is pure and does not touch networking or Redis.", "anchors": ["src/sim/physics.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f02", "text": "All environment-variable parsing and defaults live in src/config.ts; other modules import the typed config object instead of reading process.env directly.", "anchors": ["src/config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f11", "text": "Snapshots are deltas against the last tick each client acknowledged; if the ack is older than the retained history, snapshot.ts must fall back to a full snapshot or the client desyncs.", "anchors": ["src/net/snapshot.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f30", "text": "Structured logging goes through src/util/logger.ts; avoid console.log in the tick path since per-tick logging at 60Hz tanks performance.", "anchors": ["src/util/logger.ts", "src/sim/tick.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ok next step", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f12", "text": "The server is authoritative with a fixed-timestep tick loop rather than event-driven updates, so simulation is deterministic and independent of packet arrival timing.", "anchors": ["src/sim/tick.ts", "docs/netcode.md"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "ship it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f32", "text": "Local development brings up the server together with Redis via docker-compose, using values copied from env.example.", "anchors": ["docker-compose.yml", "env.example"], "label": 0, "source": "random"}, {"fact_id": "p0029-f13", "text": "Simulation code must use the fixed tick delta, never Date.now() or wall-clock deltas, to keep physics deterministic and tests reproducible.", "anchors": ["src/sim/tick.ts", "src/sim/physics.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f28", "text": "The shared Redis connection is created and exported from src/store/redisClient.ts; reuse it instead of opening new connections per module.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "makes sense, do it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f21", "text": "Interpolating between two history entries requires them to be bracketing ticks; off-by-one when the requested time equals an exact tick causes hits to be evaluated against the wrong frame.", "anchors": ["src/sim/lagCompensation.ts", "test/hitscan.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f08", "text": "Dead connections are only detected through the ping/pong heartbeat in wsServer; without it, players who lose network stay in the room as ghost entities until timeout.", "anchors": ["src/net/wsServer.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f14", "text": "If a tick overruns its budget the loop should not run catch-up ticks unbounded; a capped catch-up avoids a death spiral under load.", "anchors": ["src/sim/tick.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f35", "text": "Netcode design rationale (tick rate, snapshot rate, input buffering, rewind limits) is documented in docs/netcode.md; update it when changing those parameters.", "anchors": ["docs/netcode.md"], "label": 0, "source": "random"}, {"fact_id": "p0029-f25", "text": "Queueing players and grouping them into rooms is handled by src/match/matchmaker.ts, which uses Redis for queue state.", "anchors": ["src/match/matchmaker.ts", "src/store/redisClient.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f03", "text": "When adding a new env var, add it to src/config.ts and also to env.example so local and docker-compose setups pick it up.", "anchors": ["src/config.ts", "env.example"], "label": 0, "source": "random"}]} {"project_id": "p0029", "query": "alright", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0029-f05", "text": "Any change to the message layout in protocol.ts must bump the protocol version constant and update test/protocol.test.ts, otherwise old clients silently misparse packets.", "anchors": ["src/net/protocol.ts", "test/protocol.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f06", "text": "Decoding must validate message length and type before reading fields; malformed binary frames from clients otherwise throw inside the ws message handler and can crash the connection loop.", "anchors": ["src/net/protocol.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f20", "text": "The rewind window in lagCompensation is capped (a few hundred ms) so high-ping players cannot shoot targets that already took cover; requests beyond the cap are clamped.", "anchors": ["src/sim/lagCompensation.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f24", "text": "Rooms must stop their tick timer and clear listeners on teardown; a leaked interval keeps simulating empty matches and leaks memory.", "anchors": ["src/match/room.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f09", "text": "Client input must never be trusted for position or hit results; the server only accepts input commands (move axes, aim, fire) and computes everything in the simulation.", "anchors": ["src/net/wsServer.ts", "src/sim/world.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f29", "text": "The Redis client must have an error event handler attached; an unhandled error event on ioredis-style clients crashes the Node process when Redis restarts.", "anchors": ["src/store/redisClient.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f26", "text": "Matchmaker queue operations must be atomic in Redis (e.g. via Lua or MULTI) so two server instances cannot place the same player into different matches.", "anchors": ["src/match/matchmaker.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0029-f31", "text": "Run synthetic load against a local server with scripts/loadtest.ts, which opens many bot WebSocket clients to measure tick time under load.", "anchors": ["scripts/loadtest.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f27", "text": "Matchmaker tests exercise pairing logic with a mocked or in-memory Redis; run them with the Vitest suite rather than needing a live Redis.", "anchors": ["test/matchmaker.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0029-f33", "text": "The Dockerfile builds the TypeScript to JS and runs the compiled output with Node, so container runs do not need ts tooling at runtime.", "anchors": ["Dockerfile", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where do I start reading when I want to see how everything gets hooked up at boot?", "query_type": "natural", "positives": ["p0067-f01"], "candidates": [{"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "which file do I open to trace what runs first when the agent launches?", "query_type": "natural", "positives": ["p0067-f01"], "candidates": [{"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where does the main file wire the pipeline pieces up?", "query_type": "natural", "positives": ["p0067-f01"], "candidates": [{"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "wheres the startup file that connects everything, the boot thing", "query_type": "messy", "positives": ["p0067-f01"], "candidates": [{"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how do I add support for pulling a new kind of system stat into the agent?", "query_type": "natural", "positives": ["p0067-f02"], "candidates": [{"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where does the cpu and memory reading code live?", "query_type": "natural", "positives": ["p0067-f02"], "candidates": [{"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where do I put a new reader for another metric source, same style as the others?", "query_type": "natural", "positives": ["p0067-f02"], "candidates": [{"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where do i add a new thing that reads stuff like cpu, same as the others?", "query_type": "messy", "positives": ["p0067-f02"], "candidates": [{"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my new setting is ignored, where should the checks for values go?", "query_type": "natural", "positives": ["p0067-f03"], "candidates": [{"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "a package is opening files and env vars directly, is that how it should be done?", "query_type": "natural", "positives": ["p0067-f03"], "candidates": [{"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where should the logic that turns the yaml into a struct live?", "query_type": "natural", "positives": ["p0067-f03"], "candidates": [{"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why is every package reading env vars itself lol, where should that go", "query_type": "messy", "positives": ["p0067-f03"], "candidates": [{"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my grafana panel for queue backlog and dropped items is empty, where's that data coming from?", "query_type": "natural", "positives": ["p0067-f04"], "candidates": [{"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how do I get the agent's own health numbers to show up in my scrape target?", "query_type": "natural", "positives": ["p0067-f04"], "candidates": [{"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where's the handler for the agent's own health stats for scraping?", "query_type": "natural", "positives": ["p0067-f04"], "candidates": [{"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where r the agent's own health numbers for the grafana thing", "query_type": "messy", "positives": ["p0067-f04"], "candidates": [{"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I changed the kernel probe C file but the new behaviour never shows up at runtime", "query_type": "natural", "positives": ["p0067-f05"], "candidates": [{"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "after tweaking my bpf source the old logic still runs, what do I run to refresh it?", "query_type": "natural", "positives": ["p0067-f05"], "candidates": [{"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "after I change the bpf C code, what's the step to rebuild the embedded stuff?", "query_type": "natural", "positives": ["p0067-f05"], "candidates": [{"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the bpf thing still old after i changed the C, how to rebuild", "query_type": "messy", "positives": ["p0067-f05"], "candidates": [{"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I rebuilt the binary but my kernel probe changes do nothing, why?", "query_type": "natural", "positives": ["p0067-f06"], "candidates": [{"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "go build finishes fine yet the bpf program behaves like before my edit", "query_type": "natural", "positives": ["p0067-f06"], "candidates": [{"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why doesn't go build pick up my bpf C changes?", "query_type": "natural", "positives": ["p0067-f06"], "candidates": [{"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "go build ok but bpf stuff unchanged?? wtf", "query_type": "messy", "positives": ["p0067-f06"], "candidates": [{"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "agent dies right after launch with permission denied when attaching probes, running as a service", "query_type": "natural", "positives": ["p0067-f07"], "candidates": [{"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the service exits immediately on boot with an error about privileges even though it's installed", "query_type": "natural", "positives": ["p0067-f07"], "candidates": [{"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "service crashes on start with EPERM on bpf, unit file look okay?", "query_type": "natural", "positives": ["p0067-f07"], "candidates": [{"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "agent crashes on boot w/ perm denied, bpf stuff", "query_type": "messy", "positives": ["p0067-f07"], "candidates": [{"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "running as root and still getting permission denied when the probe maps are created on my old box", "query_type": "natural", "positives": ["p0067-f08"], "candidates": [{"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "as root but the probe setup errors with permission denied on my older server", "query_type": "natural", "positives": ["p0067-f08"], "candidates": [{"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "map setup fails as root on older kernel, anything I need to bump?", "query_type": "natural", "positives": ["p0067-f08"], "candidates": [{"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "root but bpf map thing still denied on old kernel, wat", "query_type": "messy", "positives": ["p0067-f08"], "candidates": [{"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my bpf program gets rejected at load time with a stack size complaint", "query_type": "natural", "positives": ["p0067-f09"], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "kernel refuses my probe program at load, says too big or loop issue", "query_type": "natural", "positives": ["p0067-f09"], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why does the kernel verifier reject my event handler?", "query_type": "natural", "positives": ["p0067-f09"], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "probe wont load, something about stack too big and a loop", "query_type": "messy", "positives": ["p0067-f09"], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "metrics vanish from my dashboard whenever the collector server is down for a while", "query_type": "natural", "positives": ["p0067-f10"], "candidates": [{"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I restart the receiving server and gaps appear in charts, data lost for the downtime", "query_type": "natural", "positives": ["p0067-f10"], "candidates": [{"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "does the agent keep data around on disk when the upstream is unreachable?", "query_type": "natural", "positives": ["p0067-f10"], "candidates": [{"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "lost graphs when the server was down overnight, can it hold stuff", "query_type": "messy", "positives": ["p0067-f10"], "candidates": [{"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the agent hangs and stops reading sensors once the queue gets huge", "query_type": "natural", "positives": ["p0067-f11"], "candidates": [{"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "during a long outage the agent slows everything down until it stalls", "query_type": "natural", "positives": ["p0067-f11"], "candidates": [{"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "what happens to new data when the disk spool hits its limit?", "query_type": "natural", "positives": ["p0067-f11"], "candidates": [{"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "when the queue is full does it freeze or drop stuff, which one", "query_type": "messy", "positives": ["p0067-f11"], "candidates": [{"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "flaky spool tests fail only in CI when several run at once, same folder", "query_type": "natural", "positives": ["p0067-f12"], "candidates": [{"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests pass alone but fail together and leave junk in the same dir", "query_type": "natural", "positives": ["p0067-f12"], "candidates": [{"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "spool test is flaky, which directory helper should I use for temp files?", "query_type": "natural", "positives": ["p0067-f12"], "candidates": [{"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests fail randomly in ci only, dir stuff?", "query_type": "messy", "positives": ["p0067-f12"], "candidates": [{"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "which code sends our data to the remote collector over the standard protocol?", "query_type": "natural", "positives": ["p0067-f13"], "candidates": [{"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where's the code that actually pushes the queued stuff out to the vendor endpoint?", "query_type": "natural", "positives": ["p0067-f13"], "candidates": [{"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where's the sender that flushes queued items?", "query_type": "natural", "positives": ["p0067-f13"], "candidates": [{"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "what file sends the stuff out to the server, the otel bit", "query_type": "messy", "positives": ["p0067-f13"], "candidates": [{"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the whole agent freezes when the remote server stops answering", "query_type": "natural", "positives": ["p0067-f14"], "candidates": [{"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "one unresponsive server makes all my readings stop showing up", "query_type": "natural", "positives": ["p0067-f14"], "candidates": [{"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "agent hangs on slow remote endpoint, how are timeouts set?", "query_type": "natural", "positives": ["p0067-f14"], "candidates": [{"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "server stops replying and agent just sits there forever", "query_type": "messy", "positives": ["p0067-f14"], "candidates": [{"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "data shows up in bursts with long gaps; can I make it arrive more often?", "query_type": "natural", "positives": ["p0067-f15"], "candidates": [{"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how many items get grouped before being sent, and how long can they wait?", "query_type": "natural", "positives": ["p0067-f15"], "candidates": [{"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why does the agent wait a while before sending? batching behavior?", "query_type": "natural", "positives": ["p0067-f15"], "candidates": [{"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why does stuff come in chunks w/ gaps, timing rules?", "query_type": "messy", "positives": ["p0067-f15"], "candidates": [{"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the last minute of metrics goes missing whenever I stop the agent", "query_type": "natural", "positives": ["p0067-f16"], "candidates": [{"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I ctrl-c the agent and the most recent readings never reach the backend", "query_type": "natural", "positives": ["p0067-f16"], "candidates": [{"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the newest readings vanish on stop, is the exit path sending them?", "query_type": "natural", "positives": ["p0067-f16"], "candidates": [{"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "last bit of data gone when i kill it, wat", "query_type": "messy", "positives": ["p0067-f16"], "candidates": [{"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my timing test passes locally but fails on CI machine randomly", "query_type": "natural", "positives": ["p0067-f17"], "candidates": [{"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "test waits real seconds and is slow and flaky, how to speed it up?", "query_type": "natural", "positives": ["p0067-f17"], "candidates": [{"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "write a test for the periodic send logic without real waiting", "query_type": "natural", "positives": ["p0067-f17"], "candidates": [{"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests that check timing are flaky in ci, make them stable?", "query_type": "messy", "positives": ["p0067-f17"], "candidates": [{"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "after logs get rotated the agent silently stops sending new log lines", "query_type": "natural", "positives": ["p0067-f18"], "candidates": [{"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "log shipping goes quiet every night when the file gets renamed and recreated", "query_type": "natural", "positives": ["p0067-f18"], "candidates": [{"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "log lines stop after nightly rotation, how is it detected?", "query_type": "natural", "positives": ["p0067-f18"], "candidates": [{"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "logs stop coming in after the nightly rename thing", "query_type": "messy", "positives": ["p0067-f18"], "candidates": [{"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "one app spamming huge log entries makes the agent eat RAM", "query_type": "natural", "positives": ["p0067-f19"], "candidates": [{"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "a service writes gigantic single log messages and the collector's usage spikes", "query_type": "natural", "positives": ["p0067-f19"], "candidates": [{"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "agent memory spikes on giant log messages, need a limit?", "query_type": "natural", "positives": ["p0067-f19"], "candidates": [{"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "one app dumps massive log messages and the thing eats ram", "query_type": "messy", "positives": ["p0067-f19"], "candidates": [{"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "running the agent in docker, I only see a handful of PIDs, not the box's workload", "query_type": "natural", "positives": ["p0067-f20"], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my containerized agent's CPU-per-app numbers look wrong, only sees its own stuff", "query_type": "natural", "positives": ["p0067-f20"], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "containerized agent sees only itself, which mount do I need?", "query_type": "natural", "positives": ["p0067-f20"], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "in docker agent sees like 3 pids only, host stuff missing", "query_type": "messy", "positives": ["p0067-f20"], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my metrics backend bill jumped because of thousands of label series from spawned jobs", "query_type": "natural", "positives": ["p0067-f21"], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the number of series keeps climbing every time cron jobs run", "query_type": "natural", "positives": ["p0067-f21"], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "series count blowing up from short jobs, how to cap it?", "query_type": "natural", "positives": ["p0067-f21"], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "cron jobs make series count go nuts, how to stop", "query_type": "messy", "positives": ["p0067-f21"], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "throughput graphs show impossible negative spikes right after reboot", "query_type": "natural", "positives": ["p0067-f22"], "candidates": [{"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "disk write rate charts dip below zero sometimes", "query_type": "natural", "positives": ["p0067-f22"], "candidates": [{"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "network rate goes negative after counter wraps, how is it calculated?", "query_type": "natural", "positives": ["p0067-f22"], "candidates": [{"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "net graphs dip negative sometimes, wat", "query_type": "messy", "positives": ["p0067-f22"], "candidates": [{"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I added a new knob to the yaml but the agent ignores it, what else do I have to touch?", "query_type": "natural", "positives": ["p0067-f23"], "candidates": [{"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "adding a new toggle, what files need changing so it gets accepted and tested?", "query_type": "natural", "positives": ["p0067-f23"], "candidates": [{"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how do I add a new flag to the settings file correctly?", "query_type": "natural", "positives": ["p0067-f23"], "candidates": [{"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "new yaml key, what all do i need to update", "query_type": "messy", "positives": ["p0067-f23"], "candidates": [{"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the sample settings file fails to load when I try it out, and the docs have drifted", "query_type": "natural", "positives": ["p0067-f24"], "candidates": [{"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "copied the template file and the agent refuses to start with it", "query_type": "natural", "positives": ["p0067-f24"], "candidates": [{"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the example yaml no longer matches the real fields, how do I keep it right?", "query_type": "natural", "positives": ["p0067-f24"], "candidates": [{"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "sample yaml wont load anymore, outdated?", "query_type": "messy", "positives": ["p0067-f24"], "candidates": [{"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my tests pass alone but fail when run as a suite because env vars stick around", "query_type": "natural", "positives": ["p0067-f25"], "candidates": [{"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "some settings tests break depending on what ran before them", "query_type": "natural", "positives": ["p0067-f25"], "candidates": [{"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "env var leftovers break tests, how should I set them in tests?", "query_type": "natural", "positives": ["p0067-f25"], "candidates": [{"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests flake depending on run order, env stuff leaking?", "query_type": "messy", "positives": ["p0067-f25"], "candidates": [{"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "on a plain linux server the agent keeps getting restarted in a loop, where's the service setup?", "query_type": "natural", "positives": ["p0067-f26"], "candidates": [{"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "where do I set which account the daemon runs as on a server install?", "query_type": "natural", "positives": ["p0067-f26"], "candidates": [{"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how is the service set to restart after failures?", "query_type": "natural", "positives": ["p0067-f26"], "candidates": [{"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "agent on the server keeps respawning, service file?", "query_type": "messy", "positives": ["p0067-f26"], "candidates": [{"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my local test run passes but CI fails with a different result for the same code", "query_type": "natural", "positives": ["p0067-f27"], "candidates": [{"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "which command should I type to run the same checks CI runs?", "query_type": "natural", "positives": ["p0067-f27"], "candidates": [{"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "is go test the right way to test, or is there a wrapper?", "query_type": "natural", "positives": ["p0067-f27"], "candidates": [{"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "ci fails but local go test passes, what do i run", "query_type": "messy", "positives": ["p0067-f27"], "candidates": [{"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "CI keeps rejecting my PR over style warnings, how do I clear them?", "query_type": "natural", "positives": ["p0067-f28"], "candidates": [{"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my branch can't merge because of a checker complaint, can I just silence it?", "query_type": "natural", "positives": ["p0067-f28"], "candidates": [{"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "lint check blocks my PR, ok to add ignore comments?", "query_type": "natural", "positives": ["p0067-f28"], "candidates": [{"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "pr blocked by style checker thing, how to get past", "query_type": "messy", "positives": ["p0067-f28"], "candidates": [{"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I changed the pipeline file but nothing runs on push, why?", "query_type": "natural", "positives": ["p0067-f29"], "candidates": [{"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the automation config I edited is not picked up by the hosting platform", "query_type": "natural", "positives": ["p0067-f29"], "candidates": [{"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my edits to the build automation file do nothing, where does it live?", "query_type": "natural", "positives": ["p0067-f29"], "candidates": [{"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "changed the ci yaml but nothing happens, its in a weird folder?", "query_type": "messy", "positives": ["p0067-f29"], "candidates": [{"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the container build pulls in a lot of libraries and is big, how to make it lean?", "query_type": "natural", "positives": ["p0067-f30"], "candidates": [{"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "my image has a C toolchain and dependencies I don't need", "query_type": "natural", "positives": ["p0067-f30"], "candidates": [{"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why does the shipped container include a libc setup?", "query_type": "natural", "positives": ["p0067-f30"], "candidates": [{"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "docker image is huge, why so fat", "query_type": "messy", "positives": ["p0067-f30"], "candidates": [{"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I ran the agent in a container and it starts but barely reports anything", "query_type": "natural", "positives": ["p0067-f31"], "candidates": [{"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "containerized agent runs fine yet produces almost no data, what flags?", "query_type": "natural", "positives": ["p0067-f31"], "candidates": [{"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "container starts but no probes attach, what permissions do I need?", "query_type": "natural", "positives": ["p0067-f31"], "candidates": [{"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "ran it in docker, nothing shows, starts ok tho", "query_type": "messy", "positives": ["p0067-f31"], "candidates": [{"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "after bumping one library the build breaks with weird type errors in the sdk", "query_type": "natural", "positives": ["p0067-f32"], "candidates": [{"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "upgraded only one telemetry package and now api calls don't compile", "query_type": "natural", "positives": ["p0067-f32"], "candidates": [{"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "compile errors after updating otel, how to upgrade safely?", "query_type": "natural", "positives": ["p0067-f32"], "candidates": [{"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "upgrade broke otel stuff, which versions go up together", "query_type": "messy", "positives": ["p0067-f32"], "candidates": [{"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests crash with a message about a metric name already existing", "query_type": "natural", "positives": ["p0067-f33"], "candidates": [{"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "the test binary blows up when the same setup runs twice", "query_type": "natural", "positives": ["p0067-f33"], "candidates": [{"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "test panic when metrics initialised twice, why?", "query_type": "natural", "positives": ["p0067-f33"], "candidates": [{"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests die w/ already exists error on metric init", "query_type": "messy", "positives": ["p0067-f33"], "candidates": [{"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how do I get the agent running on my laptop so it sends to my local test server?", "query_type": "natural", "positives": ["p0067-f34"], "candidates": [{"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "first time setup on my dev box, what do I copy and run?", "query_type": "natural", "positives": ["p0067-f34"], "candidates": [{"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how do I start it locally with a backend on localhost?", "query_type": "natural", "positives": ["p0067-f34"], "candidates": [{"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "run it on my laptop how, the sample file?", "query_type": "messy", "positives": ["p0067-f34"], "candidates": [{"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "why does the agent not notice quick connections that open and close fast?", "query_type": "natural", "positives": ["p0067-f35"], "candidates": [{"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I want socket activity tracked with minimal cpu cost, how's that done?", "query_type": "natural", "positives": ["p0067-f35"], "candidates": [{"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how are tcp sessions observed without scanning proc every few seconds?", "query_type": "natural", "positives": ["p0067-f35"], "candidates": [{"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "how does it see tcp stuff, is it reading proc files", "query_type": "messy", "positives": ["p0067-f35"], "candidates": [{"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "I edited the probe C file and rebuilt with go build but nothing changed", "query_type": "natural", "positives": ["p0067-f05", "p0067-f06"], "candidates": [{"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "service runs but bpf attach fails under systemd, unit file missing something", "query_type": "natural", "positives": ["p0067-f07", "p0067-f26"], "candidates": [{"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "backend down for hours, does disk fill up and what gets dropped?", "query_type": "natural", "positives": ["p0067-f10", "p0067-f11"], "candidates": [{"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f27", "text": "Build and test through the Makefile targets rather than raw go commands, so that eBPF generation and lint flags are applied consistently with CI.", "anchors": ["Makefile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "stopping the agent loses the last batch, and what controls when batches go out?", "query_type": "natural", "positives": ["p0067-f15", "p0067-f16"], "candidates": [{"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "exporter hangs when the server is slow, where's that send code?", "query_type": "natural", "positives": ["p0067-f13", "p0067-f14"], "candidates": [{"fact_id": "p0067-f13", "text": "internal/exporter/otlp.go holds the OTLP client that sends metrics, logs and traces to the backend, draining batches from the buffer.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "running in docker, need host proc and privileges for it to see anything", "query_type": "natural", "positives": ["p0067-f20", "p0067-f31"], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f30", "text": "The Docker image is built from the Dockerfile as a small static Go binary with CGO disabled so the agent can ship in a minimal runtime image.", "anchors": ["Dockerfile", "go.mod"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "metrics tests crash and the health numbers endpoint is weird, what's going on?", "query_type": "natural", "positives": ["p0067-f04", "p0067-f33"], "candidates": [{"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f01", "text": "The agent entrypoint lives in cmd/pulsewatch/main.go, which wires config, collectors, the batcher pipeline, the OTLP exporter and the self-metrics endpoint together.", "anchors": ["cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f34", "text": "Run the agent locally by copying deploy/pulsewatch.yaml.example, pointing the OTLP endpoint at a local collector, and starting the binary built from cmd/pulsewatch/main.go.", "anchors": ["deploy/pulsewatch.yaml.example", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f05", "text": "Regenerate the eBPF Go bindings by running scripts/gen_ebpf.sh after editing netconn.c; the generated objects are what loader.go embeds, so stale output means the old program is loaded.", "anchors": ["scripts/gen_ebpf.sh", "internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "tests that touch temp files fail in parallel and the env var tests too", "query_type": "natural", "positives": ["p0067-f12", "p0067-f25"], "candidates": [{"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 1, "source": "positive"}, {"fact_id": "p0067-f18", "text": "logtail must handle log rotation by reopening on inode change and tracking offsets; naively following a file descriptor stops emitting after logrotate.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f03", "text": "Configuration parsing and validation is centralized in internal/config/config.go; other packages should receive a parsed config struct rather than reading files or env vars themselves.", "anchors": ["internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "ty, continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "random"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f15", "text": "The pipeline batches records by size and by flush interval, whichever hits first, to bound both memory use and delivery latency.", "anchors": ["internal/pipeline/batcher.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "keep going", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f17", "text": "Batcher tests should use a fake clock or short intervals rather than sleeping, to keep the timing-based flush tests deterministic.", "anchors": ["internal/pipeline/batcher_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f06", "text": "Editing internal/ebpf/netconn.c has no effect until the bindings are regenerated; a plain go build does not compile the C source.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "try again", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f33", "text": "Prometheus self-metrics should be registered once on a dedicated registry; registering collectors twice (e.g. in tests) panics with a duplicate registration error.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f04", "text": "The agent's own health metrics (queue depth, drops, export failures) are exposed for Prometheus scraping from internal/selfmetrics/prom.go, separate from the telemetry shipped via OTLP.", "anchors": ["internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f35", "text": "Network connection telemetry comes from eBPF in netconn.c rather than polling /proc/net, for lower overhead and to catch short-lived connections.", "anchors": ["internal/ebpf/netconn.c", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "random"}, {"fact_id": "p0067-f23", "text": "To add a new config option, add the field and its default/validation in internal/config/config.go, cover it in config_test.go, and document it in deploy/pulsewatch.yaml.example.", "anchors": ["internal/config/config.go", "internal/config/config_test.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "sounds right", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f31", "text": "Running the container needs elevated privileges (privileged or specific caps plus host pid/mounts) for eBPF and host metrics; a default unprivileged docker run will start but collect little.", "anchors": ["Dockerfile", "internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f19", "text": "Log tailing must cap line length, because unbounded lines from misbehaving apps can blow up memory in a lightweight agent.", "anchors": ["internal/collector/logtail.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "you decide", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f14", "text": "OTLP exports must use retry with exponential backoff and honour the context deadline; a hung backend must not stall the collection pipeline.", "anchors": ["internal/exporter/otlp.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f26", "text": "deploy/pulsewatch.service is the systemd unit for bare-metal installs, defining the run user, capabilities and restart policy for the agent.", "anchors": ["deploy/pulsewatch.service"], "label": 0, "source": "random"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "sure, proceed", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f21", "text": "Per-process metrics can explode in cardinality with short-lived PIDs; procstats should aggregate by process name or limit the number of tracked processes.", "anchors": ["internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f02", "text": "Each data source is a collector under internal/collector: hostmetrics.go for CPU/memory/disk, procstats.go for per-process stats, and logtail.go for log file following. New sources should be added as sibling files there.", "anchors": ["internal/collector/hostmetrics.go", "internal/collector/procstats.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f09", "text": "eBPF C code must stay within verifier limits (bounded loops, small stack of 512 bytes), so netconn.c should keep per-event state in maps rather than local structs.", "anchors": ["internal/ebpf/netconn.c"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f12", "text": "Buffer tests touch the filesystem and must use t.TempDir(); sharing a fixed path causes cross-test interference when tests run in parallel.", "anchors": ["internal/exporter/buffer_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f22", "text": "hostmetrics collection should compute rates from counter deltas between scrapes and must handle counter resets/wraps instead of emitting negative values.", "anchors": ["internal/collector/hostmetrics.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "random"}, {"fact_id": "p0067-f10", "text": "Telemetry is buffered locally on disk before export so that backend outages don't lose data; the buffer is implemented in exporter/buffer.go rather than relying on in-memory retry in the OTLP client.", "anchors": ["internal/exporter/buffer.go", "internal/exporter/otlp.go"], "label": 0, "source": "random"}]} {"project_id": "p0067", "query": "do the thing", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0067-f16", "text": "The batcher must flush remaining records on shutdown; skipping the final flush loses the last interval of telemetry when the service is stopped.", "anchors": ["internal/pipeline/batcher.go", "cmd/pulsewatch/main.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f32", "text": "Dependency versions, especially OpenTelemetry and the eBPF library, are pinned in go.mod/go.sum; bump the OTel modules together to avoid API mismatches between SDK and exporter packages.", "anchors": ["go.mod", "go.sum"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f20", "text": "Process stats are read from /proc, so inside a container the agent must have the host /proc mounted (e.g. at /host/proc) and configured to read from there, or it reports the container's own processes.", "anchors": ["internal/collector/procstats.go", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f08", "text": "The eBPF loader may need to raise the memlock rlimit on older kernels, otherwise map creation fails with a confusing EPERM even when running as root.", "anchors": ["internal/ebpf/loader.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f07", "text": "Loading eBPF programs requires CAP_BPF/CAP_PERFMON (or root) and a kernel with BTF; the systemd unit must grant these capabilities or the loader fails at startup.", "anchors": ["internal/ebpf/loader.go", "deploy/pulsewatch.service"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f25", "text": "Config tests that set environment overrides must restore them (t.Setenv), otherwise values leak between tests and cause order-dependent failures.", "anchors": ["internal/config/config_test.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f24", "text": "deploy/pulsewatch.yaml.example must stay in sync with the real config schema; it serves as the reference for operators and should always parse successfully.", "anchors": ["deploy/pulsewatch.yaml.example", "internal/config/config.go"], "label": 0, "source": "hard"}, {"fact_id": "p0067-f28", "text": "Linting is enforced through golangci.yml and CI runs it, so lint failures block merges; fix them rather than adding broad nolint directives.", "anchors": ["golangci.yml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f29", "text": "CI is defined in github/workflows/ci.yml and runs lint and tests; note the path has no leading dot in this tree listing, so check how it is actually placed before editing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0067-f11", "text": "The local buffer has a bounded size; when full it must drop the oldest data and increment a drop counter rather than block collectors.", "anchors": ["internal/exporter/buffer.go", "internal/selfmetrics/prom.go"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where does the server start up and wire everything together?", "query_type": "natural", "positives": ["p0075-f01"], "candidates": [{"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "the app boots but i can't tell which file sets up the http server and the message queue client", "query_type": "natural", "positives": ["p0075-f01"], "candidates": [{"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where's the entry point that mounts the health and ingest endpoints?", "query_type": "natural", "positives": ["p0075-f01"], "candidates": [{"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "whr is the startup thing that wires the server n stuff", "query_type": "messy", "positives": ["p0075-f01"], "candidates": [{"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where do posted analytics payloads get parsed and then sent onward?", "query_type": "natural", "positives": ["p0075-f02"], "candidates": [{"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "my POST body gets accepted but where does the logic that forwards it live", "query_type": "natural", "positives": ["p0075-f02"], "candidates": [{"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "which file handles the POST endpoint's request flow from parse to queue?", "query_type": "natural", "positives": ["p0075-f02"], "candidates": [{"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "that post route thing, where does it parse and pass stuff on", "query_type": "messy", "positives": ["p0075-f02"], "candidates": [{"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I need to add a new property to the payload; which files need touching?", "query_type": "natural", "positives": ["p0075-f03"], "candidates": [{"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "after adding a key to incoming JSON the server still rejects it, where do I declare it", "query_type": "natural", "positives": ["p0075-f03"], "candidates": [{"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where do i add new fields for the record type", "query_type": "natural", "positives": ["p0075-f03"], "candidates": [{"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "adding a new field to the event thing, what files r needed", "query_type": "messy", "positives": ["p0075-f03"], "candidates": [{"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how should I add extra data lookup on each incoming record without tangling the code?", "query_type": "natural", "positives": ["p0075-f04"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "want to derive another attribute per request; what's the convention in this repo", "query_type": "natural", "positives": ["p0075-f04"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I add a new enricher module in the repo?", "query_type": "natural", "positives": ["p0075-f04"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "adding a new lookup thing like the geo stuff, how do i wire it", "query_type": "messy", "positives": ["p0075-f04"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I changed a value in the file but the running service still uses the old number", "query_type": "natural", "positives": ["p0075-f05"], "candidates": [{"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does setting something in the shell not change the behavior of the service", "query_type": "natural", "positives": ["p0075-f05"], "candidates": [{"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where are tunable numbers declared and what takes priority over the file?", "query_type": "natural", "positives": ["p0075-f05"], "candidates": [{"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does my env var not take effect, the toml thing", "query_type": "messy", "positives": ["p0075-f05"], "candidates": [{"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I want to track how many requests fail in a dashboard; where do I put that?", "query_type": "natural", "positives": ["p0075-f06"], "candidates": [{"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "adding a new dashboard number from inside a request function, is that okay?", "query_type": "natural", "positives": ["p0075-f06"], "candidates": [{"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where do I add a new metric so it shows up in grafana", "query_type": "natural", "positives": ["p0075-f06"], "candidates": [{"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "dashboard numbers, where do i add a new one, inside the route or somewhere else", "query_type": "messy", "positives": ["p0075-f06"], "candidates": [{"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "after I added a field the analytics database insert is failing, what else changed?", "query_type": "natural", "positives": ["p0075-f07"], "candidates": [{"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "the warehouse side doesn't have my new property, where's its definition", "query_type": "natural", "positives": ["p0075-f07"], "candidates": [{"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I changed the rust record but the warehouse column list is stale, where is that?", "query_type": "natural", "positives": ["p0075-f07"], "candidates": [{"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "warehouse ddl for the events thing, where", "query_type": "messy", "positives": ["p0075-f07"], "candidates": [{"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "new property gets silently lost on the way to storage, why?", "query_type": "natural", "positives": ["p0075-f08"], "candidates": [{"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "rows go missing in the analytics store after I add a key to the payload", "query_type": "natural", "positives": ["p0075-f08"], "candidates": [{"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do my new payload keys disappear in the warehouse ingest pipeline", "query_type": "natural", "positives": ["p0075-f08"], "candidates": [{"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "new key gets dropped somewhere downstream, kafka thing?", "query_type": "messy", "positives": ["p0075-f08"], "candidates": [{"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why doesn't a record show up in storage right away after it's sent?", "query_type": "natural", "positives": ["p0075-f09"], "candidates": [{"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do my analytics rows appear in bursts with a delay instead of instantly", "query_type": "natural", "positives": ["p0075-f09"], "candidates": [{"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is there a delay before rows land, is it deliberate buffering?", "query_type": "natural", "positives": ["p0075-f09"], "candidates": [{"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why r rows showing up late and in chunks", "query_type": "messy", "positives": ["p0075-f09"], "candidates": [{"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "when I kill the service during deploy some recent records vanish, why?", "query_type": "natural", "positives": ["p0075-f10"], "candidates": [{"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "restarts lose the last few seconds of data, how do I make it not do that", "query_type": "natural", "positives": ["p0075-f10"], "candidates": [{"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "the pod gets sigterm and recent data is gone, what should happen on exit?", "query_type": "natural", "positives": ["p0075-f10"], "candidates": [{"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "data lost when i ctrl c or redeploy, last few secs", "query_type": "messy", "positives": ["p0075-f10"], "candidates": [{"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "under heavy load memory keeps climbing forever, what should the server do?", "query_type": "natural", "positives": ["p0075-f11"], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does the ingest endpoint block for seconds when the broker is slow?", "query_type": "natural", "positives": ["p0075-f11"], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do clients get 429s during load spikes, is that intended?", "query_type": "natural", "positives": ["p0075-f11"], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "server hangs when kafka slow, should it wait or reject", "query_type": "messy", "positives": ["p0075-f11"], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "during traffic spikes some valid requests get refused even though the server isn't full", "query_type": "natural", "positives": ["p0075-f12"], "candidates": [{"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do short floods of events get turned away while average load is fine", "query_type": "natural", "positives": ["p0075-f12"], "candidates": [{"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "valid posts bounce during spikes, what setting knobs should I adjust?", "query_type": "natural", "positives": ["p0075-f12"], "candidates": [{"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "getting 429s on spikes even tho avg load low, which knob", "query_type": "messy", "positives": ["p0075-f12"], "candidates": [{"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "latency spikes on every request and the broker connection churns", "query_type": "natural", "positives": ["p0075-f13"], "candidates": [{"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "should each request open its own connection to the message broker?", "query_type": "natural", "positives": ["p0075-f13"], "candidates": [{"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is one shared broker client used everywhere instead of new ones per call?", "query_type": "natural", "positives": ["p0075-f13"], "candidates": [{"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do we only have one kafka client object, cant i just make new ones", "query_type": "messy", "positives": ["p0075-f13"], "candidates": [{"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "events from the same visitor arrive out of order in the consumer, how to keep them sequential", "query_type": "natural", "positives": ["p0075-f14"], "candidates": [{"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "one person's clicks get split across different consumers and show up jumbled", "query_type": "natural", "positives": ["p0075-f14"], "candidates": [{"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I make sure one visitor's records stay in sequence on the broker side", "query_type": "natural", "positives": ["p0075-f14"], "candidates": [{"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "visitor events jumbled order in kafka, same person", "query_type": "messy", "positives": ["p0075-f14"], "candidates": [{"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "docker image build fails with missing tool errors during the compile step", "query_type": "natural", "positives": ["p0075-f15"], "candidates": [{"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "cargo build works locally but the container image breaks on a native library step", "query_type": "natural", "positives": ["p0075-f15"], "candidates": [{"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "the image build dies in the native dependency step, what packages are needed?", "query_type": "natural", "positives": ["p0075-f15"], "candidates": [{"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "docker build dies w/ cmake not found or smth", "query_type": "messy", "positives": ["p0075-f15"], "candidates": [{"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I spin up the whole pipeline on my laptop and send test records?", "query_type": "natural", "positives": ["p0075-f16"], "candidates": [{"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I want the full local environment running with one command so I can test ingest", "query_type": "natural", "positives": ["p0075-f16"], "candidates": [{"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I bring up the stack locally with a single command", "query_type": "natural", "positives": ["p0075-f16"], "candidates": [{"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how to run everything on my machine n send fake data", "query_type": "messy", "positives": ["p0075-f16"], "candidates": [{"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I measure how many records per second the intake path can handle without a broker?", "query_type": "natural", "positives": ["p0075-f17"], "candidates": [{"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I want a speed test of the receiving code path that doesn't need external services", "query_type": "natural", "positives": ["p0075-f17"], "candidates": [{"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I run the perf test for the intake path", "query_type": "natural", "positives": ["p0075-f17"], "candidates": [{"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "speed test for the intake, no broker needed, how", "query_type": "messy", "positives": ["p0075-f17"], "candidates": [{"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I run the end-to-end tests that POST to the API endpoints?", "query_type": "natural", "positives": ["p0075-f18"], "candidates": [{"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I want tests that exercise the endpoints without opening a real port", "query_type": "natural", "positives": ["p0075-f18"], "candidates": [{"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I run the API-level test suite only", "query_type": "natural", "positives": ["p0075-f18"], "candidates": [{"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how run the api tests only, the post ones", "query_type": "messy", "positives": ["p0075-f18"], "candidates": [{"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I added a check that refuses bad records; where should its test go?", "query_type": "natural", "positives": ["p0075-f19"], "candidates": [{"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where do I write tests for new record checks, with a case that should fail", "query_type": "natural", "positives": ["p0075-f19"], "candidates": [{"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "where do unit tests for the record checks live", "query_type": "natural", "positives": ["p0075-f19"], "candidates": [{"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "tests for new checks, where do they go, need a fail one too", "query_type": "messy", "positives": ["p0075-f19"], "candidates": [{"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "bad payloads still trigger lookups on the server, why? I want them dropped early", "query_type": "natural", "positives": ["p0075-f20"], "candidates": [{"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is my server spending CPU on junk requests before throwing them out", "query_type": "natural", "positives": ["p0075-f20"], "candidates": [{"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "should broken records get checked before the geo lookup step?", "query_type": "natural", "positives": ["p0075-f20"], "candidates": [{"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "junk records still doing geo stuff, order of steps?", "query_type": "messy", "positives": ["p0075-f20"], "candidates": [{"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "a big upload gets a 413 error, should I make the server accept larger ones?", "query_type": "natural", "positives": ["p0075-f21"], "candidates": [{"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "clients send huge arrays and get refused, how to handle that", "query_type": "natural", "positives": ["p0075-f21"], "candidates": [{"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does the server refuse oversized payloads and is there a cap?", "query_type": "natural", "positives": ["p0075-f21"], "candidates": [{"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "413 on big uploads, can i up the limit or split", "query_type": "messy", "positives": ["p0075-f21"], "candidates": [{"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "requests fail with 500 when the geo file isn't on disk", "query_type": "natural", "positives": ["p0075-f22"], "candidates": [{"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "what happens to the response if the ip-to-country data is absent?", "query_type": "natural", "positives": ["p0075-f22"], "candidates": [{"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "what does the geo step do when its data file is absent", "query_type": "natural", "positives": ["p0075-f22"], "candidates": [{"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "geo file not there, does it 500 or what", "query_type": "messy", "positives": ["p0075-f22"], "candidates": [{"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "all events show the same country, probably wrong ip being read", "query_type": "natural", "positives": ["p0075-f23"], "candidates": [{"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "every visitor appears to come from the load balancer's region", "query_type": "natural", "positives": ["p0075-f23"], "candidates": [{"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "country is always wrong in prod but right locally, why?", "query_type": "natural", "positives": ["p0075-f23"], "candidates": [{"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "all visitors same country in prod, ip wrong?", "query_type": "messy", "positives": ["p0075-f23"], "candidates": [{"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "device and browser breakdown reports are slow, can the server pre-extract that at receive time?", "query_type": "natural", "positives": ["p0075-f24"], "candidates": [{"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "analysts keep asking for OS and browser columns, can we precompute them on arrival?", "query_type": "natural", "positives": ["p0075-f24"], "candidates": [{"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "should we compute device info once at receive time rather than in SQL?", "query_type": "natural", "positives": ["p0075-f24"], "candidates": [{"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "browser breakdowns slow af, precompute at recv?", "query_type": "messy", "positives": ["p0075-f24"], "candidates": [{"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "CPU spikes on every incoming record in the device detection part, why?", "query_type": "natural", "positives": ["p0075-f25"], "candidates": [{"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "each request seems to recompile something heavy, latency is bad", "query_type": "natural", "positives": ["p0075-f25"], "candidates": [{"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is device detection so slow per record? is it initialized each time", "query_type": "natural", "positives": ["p0075-f25"], "candidates": [{"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "device detection eats cpu every record, why", "query_type": "messy", "positives": ["p0075-f25"], "candidates": [{"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "some records have dates from years ago or in 2090 and mess up the analytics store", "query_type": "natural", "positives": ["p0075-f26"], "candidates": [{"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why do old-looking dates show up in storage with weird time buckets", "query_type": "natural", "positives": ["p0075-f26"], "candidates": [{"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "records with bogus dates get in, should server refuse them past a window?", "query_type": "natural", "positives": ["p0075-f26"], "candidates": [{"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "dates way off in the future getting accepted, fix?", "query_type": "messy", "positives": ["p0075-f26"], "candidates": [{"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does the analytics store have thousands of tiny data chunks after some bad uploads?", "query_type": "natural", "positives": ["p0075-f27"], "candidates": [{"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "merges are slow and there are tons of storage pieces, what's causing that", "query_type": "natural", "positives": ["p0075-f27"], "candidates": [{"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is the storage layout getting fragmented by weird dates", "query_type": "natural", "positives": ["p0075-f27"], "candidates": [{"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "too many small chunks in the db after garbage dates, why", "query_type": "messy", "positives": ["p0075-f27"], "candidates": [{"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "k8s keeps routing traffic to a pod that can't reach the message broker, how to signal that", "query_type": "natural", "positives": ["p0075-f28"], "candidates": [{"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "pod says healthy but nothing is being saved, what should the probe look at", "query_type": "natural", "positives": ["p0075-f28"], "candidates": [{"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "what should the probe endpoints report so the scheduler stops sending traffic when broker is down", "query_type": "natural", "positives": ["p0075-f28"], "candidates": [{"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "k8s probes say ok but broker down, what to change", "query_type": "messy", "positives": ["p0075-f28"], "candidates": [{"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "memory of the monitoring process keeps growing as users increase", "query_type": "natural", "positives": ["p0075-f29"], "candidates": [{"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "prometheus server gets huge series count after we added user tags", "query_type": "natural", "positives": ["p0075-f29"], "candidates": [{"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why did adding a user id to a dashboard metric blow up the monitoring server?", "query_type": "natural", "positives": ["p0075-f29"], "candidates": [{"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "prom memory blowing up w/ user tags, why", "query_type": "messy", "positives": ["p0075-f29"], "candidates": [{"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I need a new tunable number for the server, what's the full recipe to expose it", "query_type": "natural", "positives": ["p0075-f30"], "candidates": [{"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how do I make a new setting appear so ops can change it", "query_type": "natural", "positives": ["p0075-f30"], "candidates": [{"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "steps to add a new setting with a fallback when unset", "query_type": "natural", "positives": ["p0075-f30"], "candidates": [{"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "how to add new knob for server settings, from scratch", "query_type": "messy", "positives": ["p0075-f30"], "candidates": [{"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "should the lockfile be in git for this service or ignored?", "query_type": "natural", "positives": ["p0075-f31"], "candidates": [{"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "my teammate deleted the lock file from the repo, is that ok for a server app?", "query_type": "natural", "positives": ["p0075-f31"], "candidates": [{"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why is the lockfile checked in when its a service and not a library", "query_type": "natural", "positives": ["p0075-f31"], "candidates": [{"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "lockfile in git or nah for this app", "query_type": "messy", "positives": ["p0075-f31"], "candidates": [{"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "CI went red on something that looked harmless, lint related", "query_type": "natural", "positives": ["p0075-f32"], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "pipeline fails on a style nit I didn't see locally", "query_type": "natural", "positives": ["p0075-f32"], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why did the checks fail on my branch even though tests pass, a lint thing?", "query_type": "natural", "positives": ["p0075-f32"], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "ci red on lint stuff but tests pass, what to run before i push", "query_type": "messy", "positives": ["p0075-f32"], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "connection refused to the broker when running the stack in containers, using the wrong hostname?", "query_type": "natural", "positives": ["p0075-f33"], "candidates": [{"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "in the compose setup my service can't connect to kafka even though it's up", "query_type": "natural", "positives": ["p0075-f33"], "candidates": [{"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "container can't reach broker, which broker host should I put in the settings file?", "query_type": "natural", "positives": ["p0075-f33"], "candidates": [{"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "compose stack, broker conn refused, hostname thing?", "query_type": "messy", "positives": ["p0075-f33"], "candidates": [{"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "network usage to the message broker is high, can I shrink payloads on the wire?", "query_type": "natural", "positives": ["p0075-f34"], "candidates": [{"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does the data pipe send lots of tiny packets and waste bandwidth", "query_type": "natural", "positives": ["p0075-f34"], "candidates": [{"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why are sends delayed a few milliseconds on purpose, and is it compressed?", "query_type": "natural", "positives": ["p0075-f34"], "candidates": [{"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "kafka sends r slow-ish, wire size big, is it zipped", "query_type": "messy", "positives": ["p0075-f34"], "candidates": [{"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "old mobile app versions send an extra key and get rejected after the last release", "query_type": "natural", "positives": ["p0075-f35"], "candidates": [{"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "why does a new key in the posted JSON cause errors for some older senders", "query_type": "natural", "positives": ["p0075-f35"], "candidates": [{"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "should the server reject unexpected keys in posts, would that break old apps?", "query_type": "natural", "positives": ["p0075-f35"], "candidates": [{"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "extra keys from old apps, server errors, should we be strict?", "query_type": "messy", "positives": ["p0075-f35"], "candidates": [{"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "new field gets silently dropped in storage and the validator never sees it, where do I add it", "query_type": "natural", "positives": ["p0075-f03", "p0075-f08"], "candidates": [{"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I want to add a country column from geo lookup; what do I touch in the collector and the storage schema", "query_type": "natural", "positives": ["p0075-f04", "p0075-f07"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "I added a metric and a new config knob, where and how do I register each", "query_type": "natural", "positives": ["p0075-f06", "p0075-f30"], "candidates": [{"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f30", "text": "To add a config option: add the field to the struct in src/config.rs with a serde default, then set its default value in config/default.toml.", "anchors": ["src/config.rs", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "ingest slows under load; should checks run before the geo lookup, and is the queue bounded", "query_type": "natural", "positives": ["p0075-f11", "p0075-f20"], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "shutdown loses buffered data and I also don't understand the batch timing", "query_type": "natural", "positives": ["p0075-f09", "p0075-f10"], "candidates": [{"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "docker build fails and I'm not sure whether the lock file should be committed", "query_type": "natural", "positives": ["p0075-f15", "p0075-f31"], "candidates": [{"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "compose stack up, my service can't reach kafka, and I want to post sample records to test", "query_type": "natural", "positives": ["p0075-f16", "p0075-f33"], "candidates": [{"fact_id": "p0075-f16", "text": "To run the full stack locally, use docker-compose up, which starts Kafka and ClickHouse alongside the collector; then POST sample events to the collect endpoint.", "anchors": ["docker-compose.yml", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "new timestamp-derived column and bogus dates are creating junk chunks, what checks stop that", "query_type": "natural", "positives": ["p0075-f26", "p0075-f27"], "candidates": [{"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f08", "text": "Any new column added to the Event struct needs a matching column in the ClickHouse events table, or the Kafka engine/materialized view will drop or reject rows.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "validator tests for bogus future dates, where do the cases go and what's the window", "query_type": "natural", "positives": ["p0075-f19", "p0075-f26"], "candidates": [{"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "adding a device parser per record, how do I avoid rebuilding it on every call in the enrich modules", "query_type": "natural", "positives": ["p0075-f04", "p0075-f25"], "candidates": [{"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "let's do that", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f09", "text": "Events are batched in memory and flushed on size or time thresholds, trading a small latency for much higher Kafka throughput and fewer small messages for ClickHouse.", "anchors": ["src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f02", "text": "The POST ingestion handler is in src/routes/collect.rs; it parses the body, calls the validator, runs enrichment, then hands events to the batcher rather than producing to Kafka directly.", "anchors": ["src/routes/collect.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "ty, continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f05", "text": "Settings are defined as typed structs in src/config.rs and defaulted from config/default.toml; environment variables override file values.", "anchors": ["src/config.rs", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f03", "text": "Event type definitions (serde structs) are in src/schema/event.rs, while validation rules are separated into src/schema/validator.rs. Add new fields in both places.", "anchors": ["src/schema/event.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f13", "text": "The Kafka producer is a single shared client created at startup and cloned into handlers, because rdkafka producers are thread-safe and creating one per request is expensive.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f07", "text": "The ClickHouse table DDL for events is in sql/clickhouse/events.sql and must be kept in sync with the struct in src/schema/event.rs.", "anchors": ["sql/clickhouse/events.sql", "src/schema/event.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f25", "text": "UA parser compilation of regexes is expensive; build the parser once (lazy static or in app state) rather than per event.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f21", "text": "Request body size is capped to protect the collector; large batches from clients must be split on the client side rather than raising the limit.", "anchors": ["src/routes/collect.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f24", "text": "User-agent parsing is done once at ingestion and stored as parsed fields, so ClickHouse queries need not regex raw UA strings.", "anchors": ["src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "go for it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f19", "text": "Validator unit tests are in tests/validator_tests.rs; add a case there for each new validation rule, including a rejecting example.", "anchors": ["tests/validator_tests.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f28", "text": "The health route in src/routes/health.rs serves liveness and readiness probes; readiness should reflect Kafka producer connectivity for orchestrator checks.", "anchors": ["src/routes/health.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f33", "text": "Inside docker-compose the collector must use the internal Kafka listener address, not localhost, for the bootstrap servers setting.", "anchors": ["docker-compose.yml", "config/default.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f18", "text": "Run integration tests for the HTTP API with cargo test --test collect_api; these hit the Axum router in-process.", "anchors": ["tests/collect_api.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "same as before", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f04", "text": "Enrichment steps are one module per concern under src/enrich/ (geoip.rs, user_agent.rs); a new enricher should follow the same pattern and be called from the collect route.", "anchors": ["src/enrich/geoip.rs", "src/enrich/user_agent.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "ship it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f12", "text": "If the batch channel capacity is set too small in config, bursts cause spurious rejections; tune it together with the flush interval.", "anchors": ["config/default.toml", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f11", "text": "The collect handler should never await Kafka delivery inline; it pushes to a bounded channel, so backpressure surfaces as 503/429 instead of unbounded memory growth.", "anchors": ["src/routes/collect.rs", "src/batching.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f01", "text": "Application bootstrap lives in src/main.rs: it loads config, builds the Kafka producer, starts the batcher task, and mounts the Axum router with the collect and health routes.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "great, go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f27", "text": "Partitioning in the ClickHouse table is by date derived from the event timestamp, so bad timestamps create stray partitions and too many parts.", "anchors": ["sql/clickhouse/events.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f26", "text": "Event timestamps are validated against allowed clock skew; events too far in the future or past are rejected to avoid polluting ClickHouse partitions.", "anchors": ["src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f29", "text": "Metric label values must stay low-cardinality (no user ids or raw paths), otherwise the metrics registry grows without bound under high traffic.", "anchors": ["src/metrics.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f23", "text": "Client IP for GeoIP must come from the forwarded header set by the trusted proxy, not the socket peer address, which is the load balancer in deployment.", "anchors": ["src/enrich/geoip.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f20", "text": "Validation must run before enrichment so malformed or oversized events are rejected cheaply without doing GeoIP or UA parsing.", "anchors": ["src/routes/collect.rs", "src/schema/validator.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f15", "text": "rdkafka builds against librdkafka and needs cmake and a C toolchain; the Dockerfile build stage must install them or the Rust compile fails.", "anchors": ["Dockerfile", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f06", "text": "Prometheus-style counters and histograms are registered centrally in src/metrics.rs, so new metrics should be declared there instead of ad hoc in handlers.", "anchors": ["src/metrics.rs"], "label": 0, "source": "random"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "random"}]} {"project_id": "p0075", "query": "ok", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0075-f22", "text": "The GeoIP enricher reads a MaxMind database from a configured path; if the file is missing, lookups should degrade to empty location fields instead of failing the request.", "anchors": ["src/enrich/geoip.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f10", "text": "Events buffered in the batcher are lost on a hard kill; shutdown must trigger a final flush before the process exits, so do not bypass the graceful shutdown path in main.", "anchors": ["src/batching.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f35", "text": "Unknown or extra JSON fields in event payloads are handled by the serde attributes on the Event struct; changing them to deny-unknown breaks older SDK clients.", "anchors": ["src/schema/event.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f14", "text": "Messages are keyed by a stable identifier (e.g. user or anonymous id) in the producer so events from one user land in the same partition and keep ordering.", "anchors": ["src/kafka/producer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f17", "text": "Run the throughput benchmark with cargo bench; it exercises the ingest path from benches/ingest_bench.rs without needing a live Kafka.", "anchors": ["benches/ingest_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0075-f34", "text": "Producer settings favor throughput (linger and compression enabled) over minimal latency, matching the batching strategy.", "anchors": ["src/kafka/producer.rs", "config/default.toml"], "label": 0, "source": "random"}, {"fact_id": "p0075-f31", "text": "Cargo.lock is committed because this is a binary crate and CI/Docker builds need reproducible dependency versions.", "anchors": ["Cargo.lock", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0075-f32", "text": "CI runs fmt and clippy as well as tests; warnings treated as errors will fail the pipeline, so run cargo clippy before pushing.", "anchors": ["github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "app won't boot, where does spring look for beans and which folder should my main class sit in?", "query_type": "natural", "positives": ["p0086-f01"], "candidates": [{"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my new controller isn't being picked up at runtime, nothing registers it", "query_type": "natural", "positives": ["p0086-f01"], "candidates": [{"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where should the main boot class live so the whole tree gets loaded? I think it's in the root", "query_type": "natural", "positives": ["p0086-f01"], "candidates": [{"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "whr is the main spring boot class supposed to go, beans not loading lol", "query_type": "messy", "positives": ["p0086-f01"], "candidates": [{"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I'm not sure whether to put my new grading logic in a layer folder like services or somewhere else, what's the convention", "query_type": "natural", "positives": ["p0086-f02"], "candidates": [{"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do new business pieces go so they sit next to the endpoint class that uses them?", "query_type": "natural", "positives": ["p0086-f02"], "candidates": [{"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new logic for late-submission penalties, which directory should it live in given how the repo is split up?", "query_type": "natural", "positives": ["p0086-f02"], "candidates": [{"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do i put new stuff for like the course thing, layers or what", "query_type": "messy", "positives": ["p0086-f02"], "candidates": [{"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I tweaked an old sql script to add a column and now the app refuses to start with a hash mismatch error on staging", "query_type": "natural", "positives": ["p0086-f03"], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "startup dies with a complaint about a changed file after I edited a schema file that was already deployed", "query_type": "natural", "positives": ["p0086-f03"], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "can I just edit the already-run sql file to fix the column type? keeps failing with a checksum problem", "query_type": "natural", "positives": ["p0086-f03"], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "i edited V2 sql and now flyway yells on boot, wtf", "query_type": "messy", "positives": ["p0086-f03"], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I need a new column on the table but I don't want to hand-run anything on the db, what's the right way to ship it", "query_type": "natural", "positives": ["p0086-f04"], "candidates": [{"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "how do I get a column change applied on every environment automatically when the service comes up", "query_type": "natural", "positives": ["p0086-f04"], "candidates": [{"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do I put the new table definition so it gets applied when the app boots? keep it simple", "query_type": "natural", "positives": ["p0086-f04"], "candidates": [{"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "need to add a col, do i run sql by hand or what, deploy keeps missing it", "query_type": "messy", "positives": ["p0086-f04"], "candidates": [{"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my foreign key to the submissions table fails on a fresh database build, complaining the target doesn't exist yet", "query_type": "natural", "positives": ["p0086-f05"], "candidates": [{"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "fresh db setup errors out when a constraint points at a table that hasn't been made yet in the script order", "query_type": "natural", "positives": ["p0086-f05"], "candidates": [{"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "which script makes the base tables people depend on? my link to the grades table breaks on new installs", "query_type": "natural", "positives": ["p0086-f05"], "candidates": [{"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "fk error on clean db, something not created yet??", "query_type": "messy", "positives": ["p0086-f05"], "candidates": [{"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I added a script with a smaller number than the latest one and now startup throws a complaint about ordering", "query_type": "natural", "positives": ["p0086-f06"], "candidates": [{"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "deploy blows up saying my new file is behind what's already been run on prod, why", "query_type": "natural", "positives": ["p0086-f06"], "candidates": [{"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why does my newly named sql file get refused on startup even though it exists? numbering seems fine", "query_type": "natural", "positives": ["p0086-f06"], "candidates": [{"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "flyway says my file is older than the last one, can i just rename it", "query_type": "messy", "positives": ["p0086-f06"], "candidates": [{"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "requests with a valid token still come back as anonymous, where is the token parsed", "query_type": "natural", "positives": ["p0086-f07"], "candidates": [{"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want to check admin roles on a route but I'm not sure which class decides who can hit it", "query_type": "natural", "positives": ["p0086-f07"], "candidates": [{"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where is the bearer token checked before my handler runs? I think it's a chain thing", "query_type": "natural", "positives": ["p0086-f07"], "candidates": [{"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do i put the role check for teacher only endpoints, the token bit confuses me", "query_type": "messy", "positives": ["p0086-f07"], "candidates": [{"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "every call with a token returns 403 even though the login works, the user object seems empty in the handler", "query_type": "natural", "positives": ["p0086-f08"], "candidates": [{"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "authenticated user shows as null inside my controller even though the header is sent correctly", "query_type": "natural", "positives": ["p0086-f08"], "candidates": [{"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I moved my token check around and now things got weird, does ordering matter for these checks?", "query_type": "natural", "positives": ["p0086-f08"], "candidates": [{"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "token ok but getting 403s, user null in handler, order thing?", "query_type": "messy", "positives": ["p0086-f08"], "candidates": [{"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new health route returns 401 for everyone including the load balancer, what am I missing", "query_type": "natural", "positives": ["p0086-f09"], "candidates": [{"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I added an open route for signups and clients still get rejected without logging in", "query_type": "natural", "positives": ["p0086-f09"], "candidates": [{"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why does my new page keep giving forbidden even though I added it somewhere?", "query_type": "natural", "positives": ["p0086-f09"], "candidates": [{"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new route 401s for guests, supposed to be open??", "query_type": "messy", "positives": ["p0086-f09"], "candidates": [{"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where should the token key go so it's not sitting in the repo, I'm worried about leaking it", "query_type": "natural", "positives": ["p0086-f10"], "candidates": [{"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want the secret for signing tokens kept out of git, what's the proper way to pass it in", "query_type": "natural", "positives": ["p0086-f10"], "candidates": [{"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "is it ok to hardcode the jwt key in the yaml for now? someone said never", "query_type": "natural", "positives": ["p0086-f10"], "candidates": [{"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "jwt secret in git bad right? how do i keep it out", "query_type": "messy", "positives": ["p0086-f10"], "candidates": [{"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my frontend's form submissions suddenly start getting 403 after I flipped a setting to be safer, why", "query_type": "natural", "positives": ["p0086-f11"], "candidates": [{"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "all save and update requests from the mobile app now fail with forbidden after I changed the web filter config", "query_type": "natural", "positives": ["p0086-f11"], "candidates": [{"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "should I turn on that cross site request thing? my PUTs break when I do", "query_type": "natural", "positives": ["p0086-f11"], "candidates": [{"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "turned on the xsrf thing and now all my puts die, normal?", "query_type": "messy", "positives": ["p0086-f11"], "candidates": [{"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where is the persistent model class for classes a teacher creates?", "query_type": "natural", "positives": ["p0086-f12"], "candidates": [{"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "which file maps the table holding each offering with its title and schedule?", "query_type": "natural", "positives": ["p0086-f12"], "candidates": [{"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where are the web routes for listing classes defined, and where does the actual logic for creating them go?", "query_type": "natural", "positives": ["p0086-f12"], "candidates": [{"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "whats the file for the class db mapping thing", "query_type": "messy", "positives": ["p0086-f12"], "candidates": [{"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where should I check that a teacher actually owns the class before editing it, in the handler or somewhere else?", "query_type": "natural", "positives": ["p0086-f13"], "candidates": [{"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my handler is getting long with if statements about the state of a class, is that normal?", "query_type": "natural", "positives": ["p0086-f13"], "candidates": [{"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want to write unit tests for the rules around closed classes without spinning up the web layer, where do those checks live", "query_type": "natural", "positives": ["p0086-f13"], "candidates": [{"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "should the if checks for class status be in the endpoint file or elsewhere", "query_type": "messy", "positives": ["p0086-f13"], "candidates": [{"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "a student clicked register twice and got a raw sql error page instead of a nice message", "query_type": "natural", "positives": ["p0086-f14"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "signing up for the same class twice blows up with a 500, want a proper response", "query_type": "natural", "positives": ["p0086-f14"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why does double-registering crash? I want the API to say the student is already in", "query_type": "natural", "positives": ["p0086-f14"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "student hits join class twice and gets 500 lol", "query_type": "messy", "positives": ["p0086-f14"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "two people hit enroll at the exact same moment and occasionally both succeed or one errors out with something odd", "query_type": "natural", "positives": ["p0086-f15"], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "race condition when many clicks happen together on the join button, sometimes weird errors", "query_type": "natural", "positives": ["p0086-f15"], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "sometimes registration gets an odd error under load even though my existence check passed, why", "query_type": "natural", "positives": ["p0086-f15"], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "under load join sometimes errors randomly, race??", "query_type": "messy", "positives": ["p0086-f15"], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I need to look up all the people in a class, should I put that SQL in the business code or somewhere else?", "query_type": "natural", "positives": ["p0086-f16"], "candidates": [{"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do I add a new lookup for who's signed up for a course without hand-writing SQL in the logic layer", "query_type": "natural", "positives": ["p0086-f16"], "candidates": [{"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new query to find a student's active sign-ups: do I write it inline in the class that handles the logic?", "query_type": "natural", "positives": ["p0086-f16"], "candidates": [{"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "need a fn to find students in a course, where does the db call go", "query_type": "messy", "positives": ["p0086-f16"], "candidates": [{"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "sometimes a class goes over its seat limit when two joins race, even though I count first", "query_type": "natural", "positives": ["p0086-f17"], "candidates": [{"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "seat count gets off partway through a failed join, half the work stays saved", "query_type": "natural", "positives": ["p0086-f17"], "candidates": [{"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "should my enroll handler wrap the seat count and the save together so a failure rolls back?", "query_type": "natural", "positives": ["p0086-f17"], "candidates": [{"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "join fails midway and seats are wrong, need all-or-nothing", "query_type": "messy", "positives": ["p0086-f17"], "candidates": [{"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where's the code that accepts a learner's uploaded answer file and stores it?", "query_type": "natural", "positives": ["p0086-f18"], "candidates": [{"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "the route for turnin is where? I want to see where uploads land after the HTTP part", "query_type": "natural", "positives": ["p0086-f18"], "candidates": [{"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where is the place that takes an upload and saves the answer? the URL part I found in the controller", "query_type": "natural", "positives": ["p0086-f18"], "candidates": [{"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do uploaded hw answers get saved, the url bit is elsewhere", "query_type": "messy", "positives": ["p0086-f18"], "candidates": [{"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "a kid who isn't in the class managed to send work for it, how do I stop that", "query_type": "natural", "positives": ["p0086-f19"], "candidates": [{"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "late answers are still going through after the cutoff time, need the server to refuse them", "query_type": "natural", "positives": ["p0086-f19"], "candidates": [{"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why can someone submit to an assignment they never joined? I want that blocked", "query_type": "natural", "positives": ["p0086-f19"], "candidates": [{"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "people not in class can still turn stuff in and late ones too, fix?", "query_type": "messy", "positives": ["p0086-f19"], "candidates": [{"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "students in another country get marked late even though they submitted on time by their clock", "query_type": "natural", "positives": ["p0086-f20"], "candidates": [{"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "work turned in just before the cutoff gets bounced for some timezones only", "query_type": "natural", "positives": ["p0086-f20"], "candidates": [{"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "our server keeps mis-judging lateness for overseas classes, timezone thing?", "query_type": "natural", "positives": ["p0086-f20"], "candidates": [{"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "tz bug? foreign kids marked late when not", "query_type": "messy", "positives": ["p0086-f20"], "candidates": [{"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "final scores come out different depending on which endpoint I hit, where should the math live", "query_type": "natural", "positives": ["p0086-f21"], "candidates": [{"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "the total for a student is computed in three different places and they disagree", "query_type": "natural", "positives": ["p0086-f21"], "candidates": [{"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want to figure out where the mark totals are worked out so the handler isn't doing it", "query_type": "natural", "positives": ["p0086-f21"], "candidates": [{"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "grade math in like 3 files giving diff answers, where it belong", "query_type": "messy", "positives": ["p0086-f21"], "candidates": [{"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "the weighted total is off by a cent on some students, tests fail with tiny mismatches", "query_type": "natural", "positives": ["p0086-f22"], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "averages come out a hair different from the spreadsheet, a 0.01 gap keeps breaking the suite", "query_type": "natural", "positives": ["p0086-f22"], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why do my decimal scores drift by a penny after summing many items?", "query_type": "natural", "positives": ["p0086-f22"], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "penny off in the final score, floating point?? tests red", "query_type": "messy", "positives": ["p0086-f22"], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "a learner's mark dropped a lot after the teacher added a new item nobody has graded yet", "query_type": "natural", "positives": ["p0086-f23"], "candidates": [{"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new unmarked items are tanking everyone's totals, learners look way worse", "query_type": "natural", "positives": ["p0086-f23"], "candidates": [{"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why do pending items drag the final number down when no score exists yet?", "query_type": "natural", "positives": ["p0086-f23"], "candidates": [{"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ungraded stuff kills the avg, should be skipped right", "query_type": "messy", "positives": ["p0086-f23"], "candidates": [{"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want to change the scoring table without touching the table holding task definitions, can I split those?", "query_type": "natural", "positives": ["p0086-f24"], "candidates": [{"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why are the marks and the task definitions in different scripts?", "query_type": "natural", "positives": ["p0086-f24"], "candidates": [{"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why was the score table created in its own script instead of with the tasks? is there a reason", "query_type": "natural", "positives": ["p0086-f24"], "candidates": [{"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why are marks n tasks in diff sql files", "query_type": "messy", "positives": ["p0086-f24"], "candidates": [{"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I run the test command and it picks up config I don't expect, which file does it read for the test environment", "query_type": "natural", "positives": ["p0086-f25"], "candidates": [{"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my test run hits a different database than the one I set up locally, how does it choose", "query_type": "natural", "positives": ["p0086-f25"], "candidates": [{"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "when I run the test command, which config file does it use? I changed the prod one and nothing changed", "query_type": "natural", "positives": ["p0086-f25"], "candidates": [{"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "mvn test using wrong db?? which yml", "query_type": "messy", "positives": ["p0086-f25"], "candidates": [{"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "renamed a setting and the tests still pass with an old connection value, why isn't my rename showing up", "query_type": "natural", "positives": ["p0086-f26"], "candidates": [{"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I changed a key name in the yaml but the test run acts like it never existed", "query_type": "natural", "positives": ["p0086-f26"], "candidates": [{"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "tests quietly use some fallback url after I renamed a db option, why no error?", "query_type": "natural", "positives": ["p0086-f26"], "candidates": [{"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "renamed a key, tests dont fail just silently wrong db", "query_type": "messy", "positives": ["p0086-f26"], "candidates": [{"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do I put the test class for the seat-joining logic so it matches how the code folders are arranged?", "query_type": "natural", "positives": ["p0086-f27"], "candidates": [{"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my test files are scattered, what's the expected place for a test of a class?", "query_type": "natural", "positives": ["p0086-f27"], "candidates": [{"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where does the test for the grade calculator class go? folder structure question", "query_type": "natural", "positives": ["p0086-f27"], "candidates": [{"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where to put tests for enrollment stuff, same folder as code?", "query_type": "messy", "positives": ["p0086-f27"], "candidates": [{"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I need coverage for what happens when someone joins twice or the seat cap is hit, how do I write that", "query_type": "natural", "positives": ["p0086-f28"], "candidates": [{"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "want tests for the two error cases in signup, faking the storage bit, how to set up", "query_type": "natural", "positives": ["p0086-f28"], "candidates": [{"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "how should I add test cases for the already-joined and no-seats cases to the enroll test class?", "query_type": "natural", "positives": ["p0086-f28"], "candidates": [{"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "need tests for dupe join and class full, mock the db part?", "query_type": "messy", "positives": ["p0086-f28"], "candidates": [{"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I'm adding a new scoring rule, where should I start, the test or the code?", "query_type": "natural", "positives": ["p0086-f29"], "candidates": [{"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "about to change how partial credit is computed; what's the recommended order of steps", "query_type": "natural", "positives": ["p0086-f29"], "candidates": [{"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "should I write the test before changing the score math for a new rule? the code's the usual trouble spot", "query_type": "natural", "positives": ["p0086-f29"], "candidates": [{"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new scoring rule, test first or code first lol", "query_type": "messy", "positives": ["p0086-f29"], "candidates": [{"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do the db connection details and the token options get defined for the app, and how do I vary them per machine?", "query_type": "natural", "positives": ["p0086-f30"], "candidates": [{"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want different passwords per server without editing files, what's the approach", "query_type": "natural", "positives": ["p0086-f30"], "candidates": [{"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "how do I give prod its own database host without changing the repo file?", "query_type": "natural", "positives": ["p0086-f30"], "candidates": [{"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do db url and jwt stuff live, prod vs local diff", "query_type": "messy", "positives": ["p0086-f30"], "candidates": [{"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I want to bump the framework to a newer release, do I touch each library line or one place?", "query_type": "natural", "positives": ["p0086-f31"], "candidates": [{"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "how do I move to the next big release of the web framework without chasing every jar?", "query_type": "natural", "positives": ["p0086-f31"], "candidates": [{"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do I change the Java target level for the whole build?", "query_type": "natural", "positives": ["p0086-f31"], "candidates": [{"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "wanna update spring boot, where do i change it, which file", "query_type": "messy", "positives": ["p0086-f31"], "candidates": [{"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "docker build fails with a file-not-found on the artifact, what's the order of steps?", "query_type": "natural", "positives": ["p0086-f32"], "candidates": [{"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my container build can't find the output jar, what do I run first?", "query_type": "natural", "positives": ["p0086-f32"], "candidates": [{"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "image creation is erroring about a missing jar, did I skip a step?", "query_type": "natural", "positives": ["p0086-f32"], "candidates": [{"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "docker build dies no jar found, do i need to mvn something first", "query_type": "messy", "positives": ["p0086-f32"], "candidates": [{"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where does the automated check run that compiles and tests every commit on the branch?", "query_type": "natural", "positives": ["p0086-f33"], "candidates": [{"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "which file controls the automated checks that run when code is pushed up?", "query_type": "natural", "positives": ["p0086-f33"], "candidates": [{"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where is the CI config for running unit tests on each change? I need to edit it", "query_type": "natural", "positives": ["p0086-f33"], "candidates": [{"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ci file where, runs tests on commits?", "query_type": "messy", "positives": ["p0086-f33"], "candidates": [{"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "my pipeline never triggers even though the yaml looks right, is it in the right spot?", "query_type": "natural", "positives": ["p0086-f34"], "candidates": [{"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "automated runs don't start for this repo, the config file must be somewhere wrong", "query_type": "natural", "positives": ["p0086-f34"], "candidates": [{"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "why isn't the online runner noticing my config file? the file exists in the repo", "query_type": "natural", "positives": ["p0086-f34"], "candidates": [{"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ci not running at all, yaml in wrong folder maybe?", "query_type": "messy", "positives": ["p0086-f34"], "candidates": [{"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I added a new route, what else should I touch so the team's list of available calls stays accurate?", "query_type": "natural", "positives": ["p0086-f35"], "candidates": [{"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "after changing the paths, the handbook for consumers is out of date, what file holds that?", "query_type": "natural", "positives": ["p0086-f35"], "candidates": [{"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "is there a place people look up what URLs exist? mine doesn't list the new one", "query_type": "natural", "positives": ["p0086-f35"], "candidates": [{"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "added endpoint, what doc to update so ppl know", "query_type": "messy", "positives": ["p0086-f35"], "candidates": [{"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I'm new here and don't know how to get the database running on my laptop and start the service", "query_type": "natural", "positives": ["p0086-f36"], "candidates": [{"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f32", "text": "Build the container image with the Dockerfile after `mvn package`; it copies the built jar, so the jar must exist before docker build.", "anchors": ["Dockerfile", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "first time cloning, what steps get the stack up on my machine and the tables made?", "query_type": "natural", "positives": ["p0086-f36"], "candidates": [{"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where are the instructions for running the thing on my own computer?", "query_type": "natural", "positives": ["p0086-f36"], "candidates": [{"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "new to repo, how to run it on my pc, db tables?", "query_type": "messy", "positives": ["p0086-f36"], "candidates": [{"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "token parsed fine but my role check still says anonymous, is the filter order and the rule file both right?", "query_type": "natural", "positives": ["p0086-f07", "p0086-f08"], "candidates": [{"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "double join returns 500 and under load also, what's the proper guard for both", "query_type": "natural", "positives": ["p0086-f14", "p0086-f15"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "where do I wrap the seat count and the duplicate check so a double click can't break things?", "query_type": "natural", "positives": ["p0086-f14", "p0086-f17"], "candidates": [{"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "overseas student marked late and also accepted after the cutoff, where's the time logic and the enrollment check", "query_type": "natural", "positives": ["p0086-f19", "p0086-f20"], "candidates": [{"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f02", "text": "The codebase is organized by feature package (course, enrollment, assignment, grading, security) rather than by technical layer; add new domain logic to the matching feature package, with controller and service side by side.", "anchors": ["src/main/java/org/classroom/course/CourseService.java", "src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "averages off by a penny and ungraded items counted as zero, two bugs in the math?", "query_type": "natural", "positives": ["p0086-f22", "p0086-f23"], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I need a new migration number but the last one I merged was V3 and my branch is old, what do I name it and will it run", "query_type": "natural", "positives": ["p0086-f03", "p0086-f06"], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f16", "text": "Database access for enrollments goes through EnrollmentRepository, a Spring Data repository; add new derived queries there instead of writing queries inside the service.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "renamed a db key and tests silently use defaults, plus the schema script order is off, what to check", "query_type": "natural", "positives": ["p0086-f05", "p0086-f26"], "candidates": [{"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "I added a public endpoint and also a new route, do I update the route list and the permit rules", "query_type": "natural", "positives": ["p0086-f09", "p0086-f35"], "candidates": [{"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f12", "text": "The Course JPA entity is in Course.java; CourseController exposes REST endpoints and delegates all business rules to CourseService.", "anchors": ["src/main/java/org/classroom/course/Course.java", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f18", "text": "Assignment HTTP endpoints are in AssignmentController, while submission handling (receiving, validating and recording student work) lives in SubmissionService.", "anchors": ["src/main/java/org/classroom/assignment/AssignmentController.java", "src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f31", "text": "Dependencies and Java version are managed in pom.xml with the Spring Boot parent, so upgrade Boot versions there rather than pinning individual starter versions.", "anchors": ["pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f30", "text": "Spring datasource, Flyway and JWT settings are configured in application.yml under src/main/resources; environment-specific values should be supplied via environment variables.", "anchors": ["src/main/resources/application.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "added a grading rule and want the test first, where does the test file go", "query_type": "natural", "positives": ["p0086-f27", "p0086-f29"], "candidates": [{"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 1, "source": "positive"}, {"fact_id": "p0086-f28", "text": "When adding enrollment rules, extend EnrollmentServiceTest with a case for the duplicate and full-course paths, mocking EnrollmentRepository with Mockito.", "anchors": ["src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ty, continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "sure, proceed", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f05", "text": "V1__init.sql creates the base schema for courses and enrollments; assignment tables arrive in V2 and gradebook tables in V3, so foreign keys must reference tables created in earlier versions.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ok thanks", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f29", "text": "Add a new grading rule by writing a failing case in GradebookServiceTest first, since rounding and weighting edge cases are the usual regression source.", "anchors": ["src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f25", "text": "Run the test suite with `mvn test`; tests use the profile settings in application-test.yml rather than the main application.yml.", "anchors": ["src/test/resources/application-test.yml", "pom.xml"], "label": 0, "source": "random"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "all good", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f33", "text": "The CI pipeline definition is in the build workflow, which runs the Maven build and tests on pushes and pull requests.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "lgtm do it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f19", "text": "SubmissionService must verify the student is enrolled in the course and the assignment deadline has not passed before accepting a submission.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f24", "text": "Gradebook tables were added in a separate migration (V3) from assignments (V2) so grading schema can evolve independently of assignment storage.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "random"}, {"fact_id": "p0086-f17", "text": "Enrollment changes should run inside a @Transactional service method so capacity checks and the insert commit atomically.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f34", "text": "The workflow file sits under github/workflows without the leading dot in this tree, so GitHub Actions will only pick it up if it is placed at .github/workflows.", "anchors": ["github/workflows/build.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f23", "text": "Ungraded assignments must be excluded from averages rather than counted as zero in GradebookService, or student grades are artificially lowered.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f27", "text": "Unit tests mirror the main package layout: CourseServiceTest, EnrollmentServiceTest and GradebookServiceTest sit in the same package as the service they cover.", "anchors": ["src/test/java/org/classroom/course/CourseServiceTest.java", "src/test/java/org/classroom/enrollment/EnrollmentServiceTest.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f13", "text": "Controllers stay thin and hold no business logic; validation of course state and ownership happens in CourseService so it can be unit tested without MVC.", "anchors": ["src/main/java/org/classroom/course/CourseController.java", "src/main/java/org/classroom/course/CourseService.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "next", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f04", "text": "To change the schema, add the next numbered file (e.g. V4__description.sql) in db/migration; Flyway runs it on startup, so no manual SQL is needed.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f26", "text": "Test configuration overrides datasource settings, so a change to a property name in application.yml must also be mirrored in application-test.yml or tests silently fall back to defaults.", "anchors": ["src/test/resources/application-test.yml", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f03", "text": "Flyway migrations are immutable once merged: never edit an existing V*__ file, because checksum validation fails on any database that already applied it. Add a new higher-numbered migration instead.", "anchors": ["src/main/resources/db/migration/V1__init.sql", "src/main/resources/db/migration/V2__assignments.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f22", "text": "Use BigDecimal with explicit rounding for weighted grade averages in GradebookService; double arithmetic produces off-by-one-hundredth results that break gradebook tests.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java", "src/test/java/org/classroom/grading/GradebookServiceTest.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f14", "text": "Enrollment must be unique per student and course; EnrollmentService has to check for an existing enrollment before saving so duplicates return a clean conflict rather than a database constraint error.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/java/org/classroom/enrollment/EnrollmentRepository.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f10", "text": "The JWT signing secret must come from configuration/environment and never be committed; application.yml should only reference a placeholder property.", "anchors": ["src/main/resources/application.yml", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f21", "text": "Grade calculation and gradebook aggregation are centralized in GradebookService; do not compute grades in controllers or the submission flow.", "anchors": ["src/main/java/org/classroom/grading/GradebookService.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0086", "query": "ok next step", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0086-f36", "text": "For local setup steps such as running PostgreSQL and starting the app, follow the README, and let Flyway create the schema on first boot.", "anchors": ["README.md", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f20", "text": "Deadline comparisons in SubmissionService should use UTC instants; comparing local times causes submissions to be wrongly accepted or rejected for schools in other time zones.", "anchors": ["src/main/java/org/classroom/assignment/SubmissionService.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f11", "text": "CSRF protection is disabled for the stateless JWT API in SecurityConfig; enabling it will break all POST/PUT calls from API clients that don't send a CSRF token.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f09", "text": "New endpoints are denied by default for unauthenticated users; when adding a public route you must explicitly permit it in SecurityConfig or requests will return 401/403.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f15", "text": "Check-then-insert in EnrollmentService is racy under concurrent requests; rely on the database unique constraint as the final guard and handle the resulting integrity violation.", "anchors": ["src/main/java/org/classroom/enrollment/EnrollmentService.java", "src/main/resources/db/migration/V1__init.sql"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f08", "text": "JwtFilter must be registered before UsernamePasswordAuthenticationFilter in SecurityConfig, otherwise the security context is not populated from the bearer token before authorization checks run.", "anchors": ["src/main/java/org/classroom/security/SecurityConfig.java", "src/main/java/org/classroom/security/JwtFilter.java"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f06", "text": "Flyway versions must be strictly ordered; a migration with a lower number than the latest applied one will be rejected as out-of-order unless out-of-order is explicitly enabled.", "anchors": ["src/main/resources/db/migration/V3__gradebook.sql", "src/main/resources/application.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0086-f01", "text": "ClassroomApplication is the Spring Boot entry point and lives at the root package org.classroom; feature packages (course, enrollment, assignment, grading, security) sit beneath it so component scanning picks them up automatically.", "anchors": ["src/main/java/org/classroom/ClassroomApplication.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f35", "text": "When adding or changing an endpoint, update the API reference in docs/api.md so documented routes stay in sync with the controllers.", "anchors": ["docs/api.md", "src/main/java/org/classroom/course/CourseController.java"], "label": 0, "source": "random"}, {"fact_id": "p0086-f07", "text": "JWT authentication is handled by JwtFilter, which runs in the Spring Security filter chain configured in SecurityConfig; role-based route rules live in SecurityConfig, not in controllers.", "anchors": ["src/main/java/org/classroom/security/JwtFilter.java", "src/main/java/org/classroom/security/SecurityConfig.java"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i wrote a helper function and tried importing it from the package but it's undefined for users installing it", "query_type": "natural", "positives": ["p0094-f01"], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my helper works in the repo but disappears for people who install this library from npm, why?", "query_type": "natural", "positives": ["p0094-f01"], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why does my new util not show up in the generated docs for users, only exported stuff does?", "query_type": "natural", "positives": ["p0094-f01"], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "so is that helper i made hidden from ppl importing the lib or nah", "query_type": "messy", "positives": ["p0094-f01"], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where do i set my key and base url so every call picks them up automatically?", "query_type": "natural", "positives": ["p0094-f02"], "candidates": [{"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do I make the connection options apply to all the sub-APIs at once, rather than passing them per call?", "query_type": "natural", "positives": ["p0094-f02"], "candidates": [{"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "which object do i instantiate first to get access to the rest of the api methods?", "query_type": "natural", "positives": ["p0094-f02"], "candidates": [{"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "whats the main thing i new up, the one that holds my key n stuff", "query_type": "messy", "positives": ["p0094-f02"], "candidates": [{"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my auth token isn't attached on some calls and retries behave differently per endpoint, why?", "query_type": "natural", "positives": ["p0094-f03"], "candidates": [{"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i added a new endpoint and it works but skips the logging and auth stuff the others have, what am i missing?", "query_type": "natural", "positives": ["p0094-f03"], "candidates": [{"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "should i call fetch myself in my new endpoint code or is there a wrapper i should use?", "query_type": "natural", "positives": ["p0094-f03"], "candidates": [{"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "can i just use fetch in the endpoint file or nah", "query_type": "messy", "positives": ["p0094-f03"], "candidates": [{"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do i test how long the wait between attempts gets when a call keeps failing, without actually waiting", "query_type": "natural", "positives": ["p0094-f04"], "candidates": [{"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my tests for the reconnect timing are slow, can i fake the clock somehow", "query_type": "natural", "positives": ["p0094-f04"], "candidates": [{"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where do the attempt-spacing rules live so i can test them without the network?", "query_type": "natural", "positives": ["p0094-f04"], "candidates": [{"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how to test the waiting between tries w/o hitting net", "query_type": "messy", "positives": ["p0094-f04"], "candidates": [{"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i keep copy pasting the same object shape into every endpoint file, is there one place for them?", "query_type": "natural", "positives": ["p0094-f05"], "candidates": [{"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "every new file redefines the payload structure and they drift apart, how do i avoid that?", "query_type": "natural", "positives": ["p0094-f05"], "candidates": [{"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "should the response shape be inline in my module or somewhere central?", "query_type": "natural", "positives": ["p0094-f05"], "candidates": [{"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "dup'ing the object types in each file, where they supposed to go", "query_type": "messy", "positives": ["p0094-f05"], "candidates": [{"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my catch block keeps missing some failures, is there a set of error kinds i should check for?", "query_type": "natural", "positives": ["p0094-f06"], "candidates": [{"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what should i catch so my app only deals with the sdk's own failures?", "query_type": "natural", "positives": ["p0094-f06"], "candidates": [{"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what error types can escape the sdk into my code?", "query_type": "natural", "positives": ["p0094-f06"], "candidates": [{"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what errors does this thing actually throw at me lol", "query_type": "messy", "positives": ["p0094-f06"], "candidates": [{"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my incoming event checks always fail even though the secret is right, only in my express app", "query_type": "natural", "positives": ["p0094-f07"], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "payload check passes locally with a copy of the body but fails in prod, why?", "query_type": "natural", "positives": ["p0094-f07"], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "signature check fails after I add body parser json middleware, is that it?", "query_type": "natural", "positives": ["p0094-f07"], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my hook check keeps saying mismatch even tho secret ok, express w/ json middleware", "query_type": "messy", "positives": ["p0094-f07"], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "security review flagged my event auth code for a leak through response speed, what's the fix?", "query_type": "natural", "positives": ["p0094-f08"], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "auditor says my secret check could leak info by how long it takes to return false, how do I fix", "query_type": "natural", "positives": ["p0094-f08"], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "is it ok to just use === to check the hmac digests in my handler?", "query_type": "natural", "positives": ["p0094-f08"], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "security guy says my === thing leaks timing, fix?", "query_type": "messy", "positives": ["p0094-f08"], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my tests suddenly fail with an old-event error even though the code didn't change", "query_type": "natural", "positives": ["p0094-f09"], "candidates": [{"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "test suite for incoming events started breaking after a year passed, why?", "query_type": "natural", "positives": ["p0094-f09"], "candidates": [{"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why do my fixture events from 2023 get rejected in tests now?", "query_type": "natural", "positives": ["p0094-f09"], "candidates": [{"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests with old hardcoded dates r failing now, wtf", "query_type": "messy", "positives": ["p0094-f09"], "candidates": [{"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "after a network blip my app sometimes ends up with two of the same bookings, how do i stop that", "query_type": "natural", "positives": ["p0094-f10"], "candidates": [{"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "timeouts on create calls sometimes make double entries show up, can the sdk just auto retry?", "query_type": "natural", "positives": ["p0094-f10"], "candidates": [{"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the sdk retries when a create times out, is that why i see dupes?", "query_type": "natural", "positives": ["p0094-f10"], "candidates": [{"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "dupes when my post times out and gets retried?? is the sdk doing that", "query_type": "messy", "positives": ["p0094-f10"], "candidates": [{"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "we got rate limited and then all our workers hammered the service at the same moment again", "query_type": "natural", "positives": ["p0094-f11"], "candidates": [{"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how should my bulk job pause when the server says slow down, and why do waits look random?", "query_type": "natural", "positives": ["p0094-f11"], "candidates": [{"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "does the sdk wait the amount the server asks for on a 429?", "query_type": "natural", "positives": ["p0094-f11"], "candidates": [{"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "429s everywhere, does the sdk chill out automatically or nah", "query_type": "messy", "positives": ["p0094-f11"], "candidates": [{"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my test run freezes forever after I added the clock mocking, what am I missing", "query_type": "natural", "positives": ["p0094-f12"], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests leak state into each other after a wait-related test; how to clean up properly", "query_type": "natural", "positives": ["p0094-f12"], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my suite gets stuck on the delay test, do I need a cleanup step?", "query_type": "natural", "positives": ["p0094-f12"], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "test runner freezes on delay tests, needs reset somewhere?", "query_type": "messy", "positives": ["p0094-f12"], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "can I run this on an older node box or a cloudflare worker without installing extra stuff?", "query_type": "natural", "positives": ["p0094-f13"], "candidates": [{"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why doesn't this bundle pull in axios or any http lib?", "query_type": "natural", "positives": ["p0094-f13"], "candidates": [{"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "does this sdk need extra libraries on node 18?", "query_type": "natural", "positives": ["p0094-f13"], "candidates": [{"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "does it need any extra deps to run on edge workers or nah", "query_type": "messy", "positives": ["p0094-f13"], "candidates": [{"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "users on older runtimes crash with 'is not a function' after install", "query_type": "natural", "positives": ["p0094-f14"], "candidates": [{"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i used a shiny new array helper and older servers choke on it, how do i prevent that", "query_type": "natural", "positives": ["p0094-f14"], "candidates": [{"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what's the oldest runtime this lib works on?", "query_type": "natural", "positives": ["p0094-f14"], "candidates": [{"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "can i use the latest js array stuff here or will old servers break", "query_type": "messy", "positives": ["p0094-f14"], "candidates": [{"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my bundle import works in one module system but errors in the other after the build, what gives", "query_type": "natural", "positives": ["p0094-f15"], "candidates": [{"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "after I changed the compile settings, scripts importing with require can't find the file", "query_type": "natural", "positives": ["p0094-f15"], "candidates": [{"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I need both cjs and esm copies, how do they get emitted?", "query_type": "natural", "positives": ["p0094-f15"], "candidates": [{"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "esm vs cjs both working? require breaks sometimes", "query_type": "messy", "positives": ["p0094-f15"], "candidates": [{"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I renamed the build files but people installing still get module not found, why", "query_type": "natural", "positives": ["p0094-f16"], "candidates": [{"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "green CI but downstream apps throw cannot resolve after my last change", "query_type": "natural", "positives": ["p0094-f16"], "candidates": [{"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i changed the output format, what else must change so imports still resolve?", "query_type": "natural", "positives": ["p0094-f16"], "candidates": [{"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "imports broke for users after i changed the build thing, ci still green", "query_type": "messy", "positives": ["p0094-f16"], "candidates": [{"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do i run just one spec file rather than everything, it's slow", "query_type": "natural", "positives": ["p0094-f17"], "candidates": [{"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what's the command to run only the one spec I'm working on?", "query_type": "natural", "positives": ["p0094-f17"], "candidates": [{"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what command runs the tests in this repo?", "query_type": "natural", "positives": ["p0094-f17"], "candidates": [{"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do i run tests again lol, just one file pls", "query_type": "messy", "positives": ["p0094-f17"], "candidates": [{"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do I produce the reference html for the new calls I added?", "query_type": "natural", "positives": ["p0094-f18"], "candidates": [{"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where does the HTML reference come from, do i need to write something extra for new calls?", "query_type": "natural", "positives": ["p0094-f18"], "candidates": [{"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my new function has no entry in the reference site, what do I need to add?", "query_type": "natural", "positives": ["p0094-f18"], "candidates": [{"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "reference site missing my new stuff, how to rebuild", "query_type": "messy", "positives": ["p0094-f18"], "candidates": [{"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I want to add a whole new section for a different kind of object in the api, what steps?", "query_type": "natural", "positives": ["p0094-f19"], "candidates": [{"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "adding a new area of the service to the sdk, what files do I touch from start to finish?", "query_type": "natural", "positives": ["p0094-f19"], "candidates": [{"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where do I wire a new kind of endpoint group in, the constructor?", "query_type": "natural", "positives": ["p0094-f19"], "candidates": [{"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "adding a new api area, where do i hook it up", "query_type": "messy", "positives": ["p0094-f19"], "candidates": [{"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "ci fails with a complaint about possibly undefined values even though it runs fine locally", "query_type": "natural", "positives": ["p0094-f20"], "candidates": [{"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my code runs in tests but the pipeline rejects it for missing type info on parameters", "query_type": "natural", "positives": ["p0094-f20"], "candidates": [{"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why does the pipeline reject untyped params, is there a setting?", "query_type": "natural", "positives": ["p0094-f20"], "candidates": [{"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "ci yells about types on my new func, what's the rule", "query_type": "messy", "positives": ["p0094-f20"], "candidates": [{"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "logs from our service accidentally expose a credential string when a call blows up", "query_type": "natural", "positives": ["p0094-f21"], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "a bug report would contain the secret if i paste the error, is that possible?", "query_type": "natural", "positives": ["p0094-f21"], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "does the error object dump my secret when I log it?", "query_type": "natural", "positives": ["p0094-f21"], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "does the err thing leak my key if i console.log it", "query_type": "messy", "positives": ["p0094-f21"], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I keep having to check error text to tell not-found from forbidden, there must be a cleaner way", "query_type": "natural", "positives": ["p0094-f22"], "candidates": [{"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my code breaks whenever the message wording changes; how do I branch on the failure kind?", "query_type": "natural", "positives": ["p0094-f22"], "candidates": [{"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "is there a class per status I can check in catch?", "query_type": "natural", "positives": ["p0094-f22"], "candidates": [{"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how to tell which error it was w/o string matching lol", "query_type": "messy", "positives": ["p0094-f22"], "candidates": [{"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "i cancelled a call and it still got re-sent, why", "query_type": "natural", "positives": ["p0094-f23"], "candidates": [{"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I stopped my own cancel and no retry happened, but a slow server does trigger retries, why the difference?", "query_type": "natural", "positives": ["p0094-f23"], "candidates": [{"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how long before a slow call gives up, and does that count as a failure that gets retried?", "query_type": "natural", "positives": ["p0094-f23"], "candidates": [{"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "slow server gives up after x secs?? retry or nah", "query_type": "messy", "positives": ["p0094-f23"], "candidates": [{"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my unit tests for new calls are hitting the real service and getting flaky, how do I fake the network?", "query_type": "natural", "positives": ["p0094-f24"], "candidates": [{"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "how do I make my test suite not depend on internet access when checking new methods?", "query_type": "natural", "positives": ["p0094-f24"], "candidates": [{"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where should tests for a new endpoint method go, and what do I mock?", "query_type": "natural", "positives": ["p0094-f24"], "candidates": [{"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests keep calling prod, how mock it, which test file", "query_type": "messy", "positives": ["p0094-f24"], "candidates": [{"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "after changing setup arguments the copy-paste starter in the docs no longer compiles", "query_type": "natural", "positives": ["p0094-f25"], "candidates": [{"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "new users copy the getting started code from the readme and it errors, how?", "query_type": "natural", "positives": ["p0094-f25"], "candidates": [{"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the sample file is out of date after I changed the client config?", "query_type": "natural", "positives": ["p0094-f25"], "candidates": [{"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "readme example broke after i changed init args, fix the sample?", "query_type": "messy", "positives": ["p0094-f25"], "candidates": [{"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I pushed a tag and the package did not show up on the registry, what did I skip?", "query_type": "natural", "positives": ["p0094-f26"], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my publish is blocked because the number is the same as last time, what must change first", "query_type": "natural", "positives": ["p0094-f26"], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what do I need to do before cutting a new release?", "query_type": "natural", "positives": ["p0094-f26"], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "bump what before i push new version to npm, changelog too?", "query_type": "messy", "positives": ["p0094-f26"], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the automated push to the registry dies late for my friend's copy of the repo, why not sooner?", "query_type": "natural", "positives": ["p0094-f27"], "candidates": [{"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my contributor's run errors only at the very end when sending the package out, any reason?", "query_type": "natural", "positives": ["p0094-f27"], "candidates": [{"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I added a credential to the repo settings and it still errors on upload, is it the access key?", "query_type": "natural", "positives": ["p0094-f27"], "candidates": [{"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "publish job died at the end for a pr from someone's fork, why", "query_type": "messy", "positives": ["p0094-f27"], "candidates": [{"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my pull request keeps going red in the pipeline with checks I never ran on my machine", "query_type": "natural", "positives": ["p0094-f28"], "candidates": [{"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "before I send changes up, what should I run on my laptop so the server checks don't fail?", "query_type": "natural", "positives": ["p0094-f28"], "candidates": [{"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "what commands should I run before opening a pr so ci doesn't yell?", "query_type": "natural", "positives": ["p0094-f28"], "candidates": [{"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "ci red again, what do i run first to avoid that", "query_type": "messy", "positives": ["p0094-f28"], "candidates": [{"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the linter config file gives an error about module syntax even though nothing else does", "query_type": "natural", "positives": ["p0094-f29"], "candidates": [{"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why does my style checker file need a different extension from the rest of the project?", "query_type": "natural", "positives": ["p0094-f29"], "candidates": [{"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "lint is failing on my pr, but where is the lint config I should follow?", "query_type": "natural", "positives": ["p0094-f29"], "candidates": [{"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why's my eslint file weird, .cjs and everything", "query_type": "messy", "positives": ["p0094-f29"], "candidates": [{"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the api keeps returning underscore field names and my app wants camel, where should I map them?", "query_type": "natural", "positives": ["p0094-f30"], "candidates": [{"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "why do my fields show up as my_thing in the response when I expect myThing?", "query_type": "natural", "positives": ["p0094-f30"], "candidates": [{"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "where should the key renaming happen, in the caller or lower?", "query_type": "natural", "positives": ["p0094-f30"], "candidates": [{"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "field names are snake in the json, how to get camel in my objects", "query_type": "messy", "positives": ["p0094-f30"], "candidates": [{"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my scheduled time is off by hours for users in some regions after I hand in a native date", "query_type": "natural", "positives": ["p0094-f31"], "candidates": [{"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "times shift when I give the sdk a JS date from a different zone, what's happening?", "query_type": "natural", "positives": ["p0094-f31"], "candidates": [{"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I passed a Date into the start time and the server got a weird value, why?", "query_type": "natural", "positives": ["p0094-f31"], "candidates": [{"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "date objs go in and times come out wrong in some timezones", "query_type": "messy", "positives": ["p0094-f31"], "candidates": [{"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my new folder of tests is never picked up by the runner, what setting do I touch?", "query_type": "natural", "positives": ["p0094-f32"], "candidates": [{"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests I put in a new top-level folder silently don't run; why?", "query_type": "natural", "positives": ["p0094-f32"], "candidates": [{"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests in a new folder don't get discovered; what file do I change?", "query_type": "natural", "positives": ["p0094-f32"], "candidates": [{"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my tests in some other dir arent running lol", "query_type": "messy", "positives": ["p0094-f32"], "candidates": [{"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I renamed a field in the public input object and users will break on update, what's the protocol?", "query_type": "natural", "positives": ["p0094-f33"], "candidates": [{"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I removed a property from the shape people pass in; do I need to tell anyone or bump something?", "query_type": "natural", "positives": ["p0094-f33"], "candidates": [{"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "is renaming an option in the type a big deal for semver?", "query_type": "natural", "positives": ["p0094-f33"], "candidates": [{"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "renamed a field in types, do i need to bump major or what", "query_type": "messy", "positives": ["p0094-f33"], "candidates": [{"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my loop that walks through results by incrementing a counter skips or repeats entries, why?", "query_type": "natural", "positives": ["p0094-f34"], "candidates": [{"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "when I fetch all items with an increasing index I get duplicates on the next call", "query_type": "natural", "positives": ["p0094-f34"], "candidates": [{"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "can I just jump to page 5 of results with the helper?", "query_type": "natural", "positives": ["p0094-f34"], "candidates": [{"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "loop over results w/ counter gives weird dupes, how to fetch next batch", "query_type": "messy", "positives": ["p0094-f34"], "candidates": [{"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the docs example says one number but the code uses another, which is right?", "query_type": "natural", "positives": ["p0094-f35"], "candidates": [{"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "copy-paste from the guide shows a different wait limit than the library's real default, which is right?", "query_type": "natural", "positives": ["p0094-f35"], "candidates": [{"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "readme code for signing checks doesn't match what the sdk does?", "query_type": "natural", "positives": ["p0094-f35"], "candidates": [{"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "the docs say 3 retries but code says 2?? which is right", "query_type": "messy", "positives": ["p0094-f35"], "candidates": [{"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my webhook check fails and my tests with old timestamps also break, what's going on", "query_type": "natural", "positives": ["p0094-f07", "p0094-f09"], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "retry logic doubles up dupes on create and i'm not sure about the fetch wrapper", "query_type": "natural", "positives": ["p0094-f03", "p0094-f10"], "candidates": [{"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I want to add a new resource with typed input; what steps, and do the types need camel case?", "query_type": "natural", "positives": ["p0094-f19", "p0094-f30"], "candidates": [{"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "ci wants no implicit any and my new endpoint file also needs the shared types", "query_type": "natural", "positives": ["p0094-f05", "p0094-f20"], "candidates": [{"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "timeouts happen and my error handling catches them as a connection kind; do they retry?", "query_type": "natural", "positives": ["p0094-f06", "p0094-f23"], "candidates": [{"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "I bump the version and update the changelog, will the npm publish fail without the secret?", "query_type": "natural", "positives": ["p0094-f26", "p0094-f27"], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "after I add a method, do the docs page and the example file both need updates?", "query_type": "natural", "positives": ["p0094-f18", "p0094-f25"], "candidates": [{"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "tests for retry backoff hang and I also need them to not hit the real service", "query_type": "natural", "positives": ["p0094-f12", "p0094-f24"], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f19", "text": "To add a new API resource, create a class in src/resources/, add its types to src/types.ts, attach it in the TidelineClient constructor, and export public types from src/index.ts.", "anchors": ["src/resources/schedules.ts", "src/client.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "exports look fine but consumers can't find the new types from the built package", "query_type": "natural", "positives": ["p0094-f01", "p0094-f16"], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f33", "text": "Breaking changes to exported types require a major version bump and a CHANGELOG.md entry, since consumers depend on the typed request shapes.", "anchors": ["CHANGELOG.md", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f15", "text": "tsup builds both ESM and CJS outputs with bundled .d.ts files, and the package.json exports map must stay in sync with those output filenames.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f18", "text": "Generate API docs with the TypeDoc npm script; documentation is built from exported symbols and their TSDoc comments, so document new public methods in place.", "anchors": ["package.json", "src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f11", "text": "Retry backoff uses exponential delay with jitter and honors the Retry-After header on 429 responses, to avoid thundering-herd behavior against the Tideline API.", "anchors": ["src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "my error logs include the key and I'm handling 401s by matching message text", "query_type": "natural", "positives": ["p0094-f21", "p0094-f22"], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 1, "source": "positive"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f30", "text": "Public method inputs and outputs use camelCase TypeScript types, with conversion to the API's snake_case happening at the resource/request boundary instead of leaking wire names.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "ok", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f35", "text": "The README documents client options and webhook verification usage; keep its snippets in sync with src/client.ts defaults such as max retries and timeout.", "anchors": ["README.md", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "random"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "perfect, continue", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f28", "text": "CI runs lint, type-check, tests and build on pull requests; keep these steps passing locally via the npm scripts before pushing.", "anchors": ["github/workflows/ci.yml", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "carry on", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f32", "text": "Configure test coverage and environment (node) for Vitest in vitest.config.ts; add new test directories to its include pattern if you create them outside test/.", "anchors": ["vitest.config.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "k", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f01", "text": "The public API surface is defined solely by src/index.ts; anything not re-exported there is internal and tsup/TypeDoc will not expose it to consumers.", "anchors": ["src/index.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f02", "text": "The TidelineClient class in src/client.ts is the entry point; it owns configuration (API key, base URL, timeouts) and wires resource classes such as schedules and webhooks onto itself.", "anchors": ["src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f05", "text": "Shared request/response type definitions live in src/types.ts; resource files import from there instead of declaring inline interfaces.", "anchors": ["src/types.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "yes please", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f22", "text": "HTTP error responses are mapped to typed error subclasses by status code in the request layer so callers can use instanceof checks instead of parsing messages.", "anchors": ["src/http/request.ts", "src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "approved", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f27", "text": "The release workflow needs an npm token secret and typically publishes with provenance; running it from a fork or without the secret fails at the publish step, not earlier.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f08", "text": "Signature comparison in the webhook verifier must use a constant-time comparison rather than === to avoid timing attacks.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f03", "text": "All HTTP calls go through the single request function in src/http/request.ts; resource modules should never call fetch directly so that auth headers, retries and error mapping stay consistent.", "anchors": ["src/http/request.ts", "src/resources/schedules.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f23", "text": "Request timeouts are implemented with AbortController; a timeout surfaces as a connection/timeout error type and is considered retryable, unlike a caller-initiated abort.", "anchors": ["src/http/request.ts", "src/http/retry.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f24", "text": "Client tests mock the fetch layer rather than hitting the live Tideline API; extend test/client.test.ts with a stubbed fetch when adding endpoints.", "anchors": ["test/client.test.ts"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "sounds right", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f26", "text": "Release is triggered by the release workflow and publishes to npm; the version in package.json must be bumped and CHANGELOG.md updated before tagging.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f16", "text": "If tsup output filenames or formats change, the exports/main/module/types fields in package.json must be updated or consumers will get resolution errors despite a green build.", "anchors": ["tsup.config.ts", "package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f14", "text": "The minimum supported Node version is declared in package.json engines; do not use APIs newer than that version in src/.", "anchors": ["package.json"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f29", "text": "ESLint rules in the repo config are enforced in CI; the config is a CommonJS file because the package is ESM-typed.", "anchors": ["eslintrc.cjs"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f04", "text": "Retry and backoff logic is isolated in src/http/retry.ts so it can be unit-tested with fake timers independently of the transport.", "anchors": ["src/http/retry.ts", "test/retry.test.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f07", "text": "Webhook signature verification must run against the raw request body string/bytes; re-serialized parsed JSON changes whitespace and key order and makes the HMAC comparison fail.", "anchors": ["src/resources/webhooks.ts"], "label": 0, "source": "random"}, {"fact_id": "p0094-f17", "text": "Run the test suite with npm test (Vitest); use npx vitest run test/webhooks.test.ts to run a single file.", "anchors": ["vitest.config.ts", "package.json"], "label": 0, "source": "random"}]} {"project_id": "p0094", "query": "great, go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0094-f12", "text": "Retry tests use Vitest fake timers; forgetting to advance timers or restore real timers in afterEach causes hangs or leaks into other tests.", "anchors": ["test/retry.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f10", "text": "Retries must only be applied to idempotent requests or those carrying an idempotency key; blindly retrying schedule creation POSTs could create duplicate schedules.", "anchors": ["src/http/retry.ts", "src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f34", "text": "List endpoints for schedules use cursor pagination; do not assume page numbers when adding helpers in the schedules resource.", "anchors": ["src/resources/schedules.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f20", "text": "tsconfig uses strict mode; new code must compile without implicit any or unchecked nulls, and CI type-checks before building.", "anchors": ["tsconfig.json", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f31", "text": "Datetime fields on schedules are sent as ISO 8601 strings; passing Date objects without converting them in the resource layer serializes incorrectly for some timezones.", "anchors": ["src/resources/schedules.ts", "src/types.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f21", "text": "The client must not log or include the API key in error messages or serialized errors; errors.ts should only carry status, request id and response body.", "anchors": ["src/errors.ts", "src/client.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f09", "text": "Webhook verification enforces a timestamp tolerance to prevent replay; tests that use fixed old timestamps must fake the system time or they will fail with a stale-signature error.", "anchors": ["src/resources/webhooks.ts", "test/webhooks.test.ts"], "label": 0, "source": "hard"}, {"fact_id": "p0094-f25", "text": "examples/basic.ts is a runnable usage sample mirroring the README quickstart; update it whenever the client constructor options or method signatures change.", "anchors": ["examples/basic.ts", "README.md"], "label": 0, "source": "random"}, {"fact_id": "p0094-f13", "text": "The SDK uses the global fetch API rather than an HTTP dependency, keeping it dependency-free and runnable on Node 18+ and edge runtimes.", "anchors": ["src/http/request.ts", "package.json"], "label": 0, "source": "random"}, {"fact_id": "p0094-f06", "text": "Error classes (API errors, connection errors, signature errors) are defined in src/errors.ts and are the only error types thrown to SDK users.", "anchors": ["src/errors.ts"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent won't boot cleanly, where does the entry point kick everything off and wire it together?", "query_type": "natural", "positives": ["p0105-f01"], "candidates": [{"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why does the binary sit there before anything gets wired up on launch?", "query_type": "natural", "positives": ["p0105-f01"], "candidates": [{"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where's the entry point that loads config and starts everything up?", "query_type": "natural", "positives": ["p0105-f01"], "candidates": [{"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "wher does the app begin, the boot thing w tokio n stuff", "query_type": "messy", "positives": ["p0105-f01"], "candidates": [{"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "my new source plugin compiles but never runs, nothing picks it up", "query_type": "natural", "positives": ["p0105-f02"], "candidates": [{"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "added a file for a new metric reader but it's silently ignored at runtime", "query_type": "natural", "positives": ["p0105-f02"], "candidates": [{"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where do I hook a new source type into the agent so it actually runs?", "query_type": "natural", "positives": ["p0105-f02"], "candidates": [{"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "made a new source thing, agent ignores it. where u wire it??", "query_type": "messy", "positives": ["p0105-f02"], "candidates": [{"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "events pile up in memory and the agent slows down producers when the sink is slow, why?", "query_type": "natural", "positives": ["p0105-f03"], "candidates": [{"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why do my data points get grouped into chunks before they leave, and what throttles the sources?", "query_type": "natural", "positives": ["p0105-f03"], "candidates": [{"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where is the code that groups data points into chunks and decides when to send them?", "query_type": "natural", "positives": ["p0105-f03"], "candidates": [{"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why r my points grouped n slowed when sink is slow, the throttle thing", "query_type": "messy", "positives": ["p0105-f03"], "candidates": [{"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I set a value in the toml and the agent rejects the file with a cryptic error", "query_type": "natural", "positives": ["p0105-f04"], "candidates": [{"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent refuses to start after I edit the settings file, says invalid value", "query_type": "natural", "positives": ["p0105-f04"], "candidates": [{"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where are settings checked when the file is read, and where's the list of all settings explained?", "query_type": "natural", "positives": ["p0105-f04"], "candidates": [{"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "toml file rejected, which file has all the knobs listed w/ comments", "query_type": "messy", "positives": ["p0105-f04"], "candidates": [{"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where is the code that writes queued data to a spool directory on the host?", "query_type": "natural", "positives": ["p0105-f05"], "candidates": [{"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "which code stores unsent data as files when the network is down?", "query_type": "natural", "positives": ["p0105-f05"], "candidates": [{"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where does the agent keep the spooled files, and what's the public-facing API for queueing?", "query_type": "natural", "positives": ["p0105-f05"], "candidates": [{"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "that spool file code, the queue thing, where is it", "query_type": "messy", "positives": ["p0105-f05"], "candidates": [{"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "network tracing shows no data at all and I can't tell which side is broken", "query_type": "natural", "positives": ["p0105-f06"], "candidates": [{"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where's the in-kernel C for tcp tracing and the Rust side that reads it?", "query_type": "natural", "positives": ["p0105-f06"], "candidates": [{"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "the ebpf tracing side: where's the C part and the Rust reader?", "query_type": "natural", "positives": ["p0105-f06"], "candidates": [{"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "ebpf net stuff, which file is the c code and which is rust reader", "query_type": "messy", "positives": ["p0105-f06"], "candidates": [{"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "after I added a field to the event my decoded values are garbage", "query_type": "natural", "positives": ["p0105-f07"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "tracing numbers look shifted and wrong since I touched the event struct", "query_type": "natural", "positives": ["p0105-f07"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I added a field to the event struct in C and now the Rust fields show nonsense, what do I update?", "query_type": "natural", "positives": ["p0105-f07"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "added a field in the c event thing, now everything read off wrong, huh", "query_type": "messy", "positives": ["p0105-f07"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent logs permission denied when attaching probes even though it runs as the service user", "query_type": "natural", "positives": ["p0105-f08"], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "ebpf attach fails with EPERM on the packaged install, what privileges are missing?", "query_type": "natural", "positives": ["p0105-f08"], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "service unit: what privileges does it need so kernel probes attach?", "query_type": "natural", "positives": ["p0105-f08"], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "EPERM when probes attach on the box, prob perms in the unit file??", "query_type": "messy", "positives": ["p0105-f08"], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "compiles clean with clang but the kernel refuses to load it, something about invalid loops or big locals", "query_type": "natural", "positives": ["p0105-f09"], "candidates": [{"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "kernel load fails with a too large type error even though the C builds fine", "query_type": "natural", "positives": ["p0105-f09"], "candidates": [{"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "bpf load fails after the C builds fine, the kernel complains about a loop or memory size. what to do?", "query_type": "natural", "positives": ["p0105-f09"], "candidates": [{"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "clang build works but kernel says nope, loops or big arrays?", "query_type": "messy", "positives": ["p0105-f09"], "candidates": [{"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I changed a .proto and the generated code didn't update, do I need to clean?", "query_type": "natural", "positives": ["p0105-f10"], "candidates": [{"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "edited the bpf source but the built binary still has old behavior", "query_type": "natural", "positives": ["p0105-f10"], "candidates": [{"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why doesn't my change in the BPF C file show up after a cargo build, do I need to do anything extra?", "query_type": "natural", "positives": ["p0105-f10"], "candidates": [{"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "changed the bpf c, cargo build still old behavior, need to touch something?", "query_type": "messy", "positives": ["p0105-f10"], "candidates": [{"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I want to clean up the field tags in the wire format, anything I should avoid?", "query_type": "natural", "positives": ["p0105-f11"], "candidates": [{"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "tidying up the wire definition, want to reorder the field tags", "query_type": "natural", "positives": ["p0105-f11"], "candidates": [{"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "reorganizing field tags in the wire format for cleanup, safe?", "query_type": "natural", "positives": ["p0105-f11"], "candidates": [{"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "can i renumber the tags in the wire def or nah, old disk data", "query_type": "messy", "positives": ["p0105-f11"], "candidates": [{"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "after upgrading the agent, old queued files fail to replay with a decode error", "query_type": "natural", "positives": ["p0105-f12"], "candidates": [{"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "leftover queue data from before the update won't send anymore", "query_type": "natural", "positives": ["p0105-f12"], "candidates": [{"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "new field added to the telemetry wire type and now old spool files can't be read after the update", "query_type": "natural", "positives": ["p0105-f12"], "candidates": [{"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "upgraded and old spool stuff wont replay, decode error?", "query_type": "messy", "positives": ["p0105-f12"], "candidates": [{"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why does the agent write stuff to disk at all, isn't that slower than keeping it in ram?", "query_type": "natural", "positives": ["p0105-f13"], "candidates": [{"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "lost metrics when the backend was down for an hour, is there any way to keep them?", "query_type": "natural", "positives": ["p0105-f13"], "candidates": [{"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why keep unsent points on disk instead of RAM? what problem does that solve?", "query_type": "natural", "positives": ["p0105-f13"], "candidates": [{"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why write to disk not ram, wat happens when backend dies", "query_type": "messy", "positives": ["p0105-f13"], "candidates": [{"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "disk usage cap reached and now my oldest points vanish, is that expected?", "query_type": "natural", "positives": ["p0105-f14"], "candidates": [{"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent is losing older data when the spool fills, and the app never slows down. intended?", "query_type": "natural", "positives": ["p0105-f14"], "candidates": [{"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "what happens when the local storage hits its limit, does the agent slow the app down or discard something?", "query_type": "natural", "positives": ["p0105-f14"], "candidates": [{"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "storage full, older stuff gets tossed?? does app hang", "query_type": "messy", "positives": ["p0105-f14"], "candidates": [{"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "after a power cut the agent refuses to start, complaining about a half-written file", "query_type": "natural", "positives": ["p0105-f15"], "candidates": [{"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "crash during write leaves a broken file and the next boot errors out", "query_type": "natural", "positives": ["p0105-f15"], "candidates": [{"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how do I make sure file writes survive a crash, and what about a partial file left on boot?", "query_type": "natural", "positives": ["p0105-f15"], "candidates": [{"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "power loss then agent wont come up, partial file somewhere", "query_type": "messy", "positives": ["p0105-f15"], "candidates": [{"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how do I run the recovery and ordering checks for the spool without sudo?", "query_type": "natural", "positives": ["p0105-f16"], "candidates": [{"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "what command runs the crash tests for the local storage, do they need sudo?", "query_type": "natural", "positives": ["p0105-f16"], "candidates": [{"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "which test target covers the spool's crash behaviour and order? do I need elevated perms?", "query_type": "natural", "positives": ["p0105-f16"], "candidates": [{"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "spool tests how to run, no sudo right?", "query_type": "messy", "positives": ["p0105-f16"], "candidates": [{"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how do I test the flush logic without hitting a real server?", "query_type": "natural", "positives": ["p0105-f17"], "candidates": [{"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "want a test that checks grouping and flushing with a mock sink instead of a live collector", "query_type": "natural", "positives": ["p0105-f17"], "candidates": [{"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "is there an integration test for flushing and throttling, and does it need a real network target?", "query_type": "natural", "positives": ["p0105-f17"], "candidates": [{"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "test for flushing w/o real backend?? how", "query_type": "messy", "positives": ["p0105-f17"], "candidates": [{"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how do I check whether my change made the agent slower to process points?", "query_type": "natural", "positives": ["p0105-f18"], "candidates": [{"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "need numbers on how fast events get encoded before and after tweaking the grouping code", "query_type": "natural", "positives": ["p0105-f18"], "candidates": [{"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how do I get a before and after speed comparison for my change to the grouping code?", "query_type": "natural", "positives": ["p0105-f18"], "candidates": [{"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "is my change slower?? how to compare speed quick", "query_type": "messy", "positives": ["p0105-f18"], "candidates": [{"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "can I send the data to Jaeger or Grafana without writing an adapter?", "query_type": "natural", "positives": ["p0105-f19"], "candidates": [{"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "do I need to build a special receiver to get metrics into my existing observability stack?", "query_type": "natural", "positives": ["p0105-f19"], "candidates": [{"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "which vendors can take this agent's output directly, or do I need a bridge?", "query_type": "natural", "positives": ["p0105-f19"], "candidates": [{"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "can it talk to grafana or jaeger directly or nah", "query_type": "messy", "positives": ["p0105-f19"], "candidates": [{"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent CPU spikes and the spool fills up whenever the remote side is unreachable", "query_type": "natural", "positives": ["p0105-f20"], "candidates": [{"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "when the remote is down my host gets hot and disk fills fast", "query_type": "natural", "positives": ["p0105-f20"], "candidates": [{"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why does the agent hammer a dead remote so hard and fill the spool? what's a better wait strategy between attempts?", "query_type": "natural", "positives": ["p0105-f20"], "candidates": [{"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "remote dead, cpu 100 and disk eaten, wait between tries?", "query_type": "messy", "positives": ["p0105-f20"], "candidates": [{"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent freezes its send loop whenever the remote server stops responding mid-call", "query_type": "natural", "positives": ["p0105-f21"], "candidates": [{"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "sometimes all sending stops for minutes when the server hangs, no error logged", "query_type": "natural", "positives": ["p0105-f21"], "candidates": [{"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why does sending get stuck forever when the server accepts the connection and never replies?", "query_type": "natural", "positives": ["p0105-f21"], "candidates": [{"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "server hangs, agent sends nothing for ages, why", "query_type": "messy", "positives": ["p0105-f21"], "candidates": [{"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "cpu and memory numbers in my dashboard look like the tiny container, not the actual machine", "query_type": "natural", "positives": ["p0105-f22"], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent reports the wrong memory total, it only sees the limit of its sandbox", "query_type": "natural", "positives": ["p0105-f22"], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why do the machine stats show only the inside of the pod? what mount is needed?", "query_type": "natural", "positives": ["p0105-f22"], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "mem numbers wrong in docker, only sees itself?", "query_type": "messy", "positives": ["p0105-f22"], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "logs stop reaching my backend after logrotate runs, and no errors appear", "query_type": "natural", "positives": ["p0105-f23"], "candidates": [{"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "logs vanish from the stream once the file gets rolled over daily", "query_type": "natural", "positives": ["p0105-f23"], "candidates": [{"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "logs stop flowing after the daily file roll; what does the follower do when the path changes?", "query_type": "natural", "positives": ["p0105-f23"], "candidates": [{"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "logs die after rotate, no error, wat", "query_type": "messy", "positives": ["p0105-f23"], "candidates": [{"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "after restarting the agent I get duplicate log lines from the start of every file", "query_type": "natural", "positives": ["p0105-f24"], "candidates": [{"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent reprocesses whole log files on boot, flooding the backend", "query_type": "natural", "positives": ["p0105-f24"], "candidates": [{"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how should the file follower remember its position across runs so nothing repeats or gets skipped?", "query_type": "natural", "positives": ["p0105-f24"], "candidates": [{"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "dupes of logs after restart, its rereading everything??", "query_type": "messy", "positives": ["p0105-f24"], "candidates": [{"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "the whole agent stalls for a second every poll when the metrics read runs", "query_type": "natural", "positives": ["p0105-f25"], "candidates": [{"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "exporter sends get delayed whenever a heavy file read happens in a source", "query_type": "natural", "positives": ["p0105-f25"], "candidates": [{"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "reading /proc in a source seems to freeze other async work, how should I offload that work?", "query_type": "natural", "positives": ["p0105-f25"], "candidates": [{"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "async stuff freezes when i read proc stuff, how offload", "query_type": "messy", "positives": ["p0105-f25"], "candidates": [{"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "my build works on my laptop but CI gets a different error with the same code", "query_type": "natural", "positives": ["p0105-f26"], "candidates": [{"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "same repo gives different compile errors on different machines, why?", "query_type": "natural", "positives": ["p0105-f26"], "candidates": [{"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "why would the same source compile differently across machines and the CI box? how do we lock the version?", "query_type": "natural", "positives": ["p0105-f26"], "candidates": [{"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "works on my pc not ci, compile diff, lock rust ver?", "query_type": "messy", "positives": ["p0105-f26"], "candidates": [{"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "CI fails on my PR right after I added a crate, the message mentions a policy", "query_type": "natural", "positives": ["p0105-f27"], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "pipeline went red after pulling in a new library, says something is not permitted", "query_type": "natural", "positives": ["p0105-f27"], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "my pull request went red after I added a crate, the log says something about a policy check", "query_type": "natural", "positives": ["p0105-f27"], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "new crate and ci red, policy thing?", "query_type": "messy", "positives": ["p0105-f27"], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "how can I see if a library upgrade will break the CI policy before I push?", "query_type": "natural", "positives": ["p0105-f28"], "candidates": [{"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "want to verify my new package before opening a PR, is there a quick command?", "query_type": "natural", "positives": ["p0105-f28"], "candidates": [{"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "before pushing a version bump, is there a fast way to find out whether CI will reject it?", "query_type": "natural", "positives": ["p0105-f28"], "candidates": [{"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "before pushing new crate, quick way to see if ci yells", "query_type": "messy", "positives": ["p0105-f28"], "candidates": [{"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where do I change what runs on every pull request versus when we cut a tag?", "query_type": "natural", "positives": ["p0105-f29"], "candidates": [{"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "which config controls the automated checks on push, and which one ships binaries?", "query_type": "natural", "positives": ["p0105-f29"], "candidates": [{"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where's the automation that runs tests on each push, and separately the one that ships binaries?", "query_type": "natural", "positives": ["p0105-f29"], "candidates": [{"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "which yaml runs tests vs which one ships the bins", "query_type": "messy", "positives": ["p0105-f29"], "candidates": [{"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "CI build dies in the build script with a clang not found message, but the rust code is fine", "query_type": "natural", "positives": ["p0105-f30"], "candidates": [{"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "fresh runner: bpf step blows up with some missing include file", "query_type": "natural", "positives": ["p0105-f30"], "candidates": [{"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "build fails only on new CI machines with an error about a header file, what packages are needed?", "query_type": "natural", "positives": ["p0105-f30"], "candidates": [{"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "ci bpf step explodes, clang? headers? help", "query_type": "messy", "positives": ["p0105-f30"], "candidates": [{"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "the sample settings file says one default but the agent behaves differently", "query_type": "natural", "positives": ["p0105-f31"], "candidates": [{"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I changed a setting's default and the docs still show the old value", "query_type": "natural", "positives": ["p0105-f31"], "candidates": [{"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "docs list one value for a setting but the program uses another; how do I keep them aligned?", "query_type": "natural", "positives": ["p0105-f31"], "candidates": [{"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "sample toml says diff value than real, fix?", "query_type": "messy", "positives": ["p0105-f31"], "candidates": [{"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent hangs in a retry loop forever when its initial setup fails instead of dying", "query_type": "natural", "positives": ["p0105-f32"], "candidates": [{"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "when the first setup step errors the process just sits there and never gets restarted by the supervisor", "query_type": "natural", "positives": ["p0105-f32"], "candidates": [{"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "if the boot-time check fails, should the process keep looping or quit so the supervisor reruns it?", "query_type": "natural", "positives": ["p0105-f32"], "candidates": [{"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "bad init, proc just loops, not dying so manager cant restart", "query_type": "messy", "positives": ["p0105-f32"], "candidates": [{"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "where's the overview of how data moves from sources to the backend, I need to add a new step", "query_type": "natural", "positives": ["p0105-f33"], "candidates": [{"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "need a diagram-style summary of the data path before I add a new hop", "query_type": "natural", "positives": ["p0105-f33"], "candidates": [{"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "is there a written overview of how telemetry travels through the agent? I want to add a hop and need to note it.", "query_type": "natural", "positives": ["p0105-f33"], "candidates": [{"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "overview doc of data path? adding a new hop, where to note it", "query_type": "messy", "positives": ["p0105-f33"], "candidates": [{"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I killed the agent and the last few minutes of points never reached the backend", "query_type": "natural", "positives": ["p0105-f34"], "candidates": [{"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "when the service is stopped the final chunk of data is missing from dashboards", "query_type": "natural", "positives": ["p0105-f34"], "candidates": [{"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "stopping the service loses the most recent data, what should happen to pending work before the program ends?", "query_type": "natural", "positives": ["p0105-f34"], "candidates": [{"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "stop agent, last bit of data gone, why", "query_type": "messy", "positives": ["p0105-f34"], "candidates": [{"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "I added a field to the event struct and now old spool files and new decoding both break, what do I update?", "query_type": "natural", "positives": ["p0105-f07", "p0105-f12"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "new collector for a file source: need the module file and where it's registered, and I don't want it blocking the runtime", "query_type": "natural", "positives": ["p0105-f02", "p0105-f25"], "candidates": [{"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "adding a config option: where do I define it and how do I keep the sample file in sync?", "query_type": "natural", "positives": ["p0105-f04", "p0105-f31"], "candidates": [{"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "dependency bump PR failing the policy check and CI also missing clang, what's going on?", "query_type": "natural", "positives": ["p0105-f27", "p0105-f30"], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "disk queue fills while backoff retries keep the spool churning, how do I tune that?", "query_type": "natural", "positives": ["p0105-f14", "p0105-f20"], "candidates": [{"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "random"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "agent got killed while writing: will the final flush still happen and are the partial files safe?", "query_type": "natural", "positives": ["p0105-f15", "p0105-f34"], "candidates": [{"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "ebpf struct changed and the systemd unit also needs something, what's missing?", "query_type": "natural", "positives": ["p0105-f07", "p0105-f08"], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f06", "text": "The eBPF side has two halves: the kernel program in bpf/net_trace.bpf.c and the userspace loader/reader in src/collectors/net_trace.rs.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f04", "text": "Config parsing and validation live in src/config.rs, with config/tracelet.example.toml as the documented reference of every option.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f33", "text": "High-level design of the collect-buffer-export data flow is documented in docs/architecture.md; update it when adding a stage or exporter.", "anchors": ["docs/architecture.md"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "pipeline feels slower, which test covers batching and which benchmark should I run?", "query_type": "natural", "positives": ["p0105-f17", "p0105-f18"], "candidates": [{"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f19", "text": "The exporter speaks OTLP so any OpenTelemetry-compatible backend or Collector can receive data without a custom ingest service.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "after upgrade my wire changes break replay of old segments, and I also renumbered tags, what now?", "query_type": "natural", "positives": ["p0105-f11", "p0105-f12"], "candidates": [{"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "dashboards show wrong machine numbers in docker and the log tail stops after rotation, two problems?", "query_type": "natural", "positives": ["p0105-f22", "p0105-f23"], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f01", "text": "Process startup lives in src/main.rs: it loads config, builds the Tokio runtime, spawns each collector and wires them into the pipeline and the OTLP exporter.", "anchors": ["src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "all good", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "ship it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "great, go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f23", "text": "Log tailing must handle log rotation (inode change and truncation); otherwise the tailer keeps reading a deleted file and silently stops emitting lines.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f02", "text": "All collectors live under src/collectors/ and are registered in src/collectors/mod.rs; a new collector needs a module file plus a registration entry there.", "anchors": ["src/collectors/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f10", "text": "build.rs compiles the protobuf definitions and the BPF object during cargo build, so editing proto/ or bpf/ files triggers a rebuild without extra steps.", "anchors": ["build.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "yep", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f20", "text": "OTLP export retries should use exponential backoff with jitter; tight retry loops against a down endpoint fill the disk queue and burn CPU on the host.", "anchors": ["src/exporters/otlp.rs", "src/pipeline.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f17", "text": "End-to-end pipeline behavior (batching, flush, backpressure) is tested with `cargo test --test pipeline_test`, using a fake exporter rather than a real OTLP endpoint.", "anchors": ["tests/pipeline_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f31", "text": "Config changes must be reflected in both src/config.rs and config/tracelet.example.toml so documented defaults match the actual serde defaults.", "anchors": ["src/config.rs", "config/tracelet.example.toml"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "let's do that", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f09", "text": "eBPF verifier limits (stack size 512 bytes, bounded loops) reject programs that compile fine in clang; keep per-event state in maps rather than on the stack.", "anchors": ["bpf/net_trace.bpf.c"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f22", "text": "Host metrics are read from /proc and /sys, so they reflect the container's view unless the agent runs with the host procfs mounted; the Dockerfile deployment needs that mount for accurate numbers.", "anchors": ["src/collectors/host_metrics.rs", "Dockerfile"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f13", "text": "Telemetry is buffered to a local disk queue instead of memory only so that data survives collector endpoint outages and agent restarts.", "anchors": ["src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f32", "text": "The agent runs as a systemd service with restart-on-failure, so a fatal startup error should exit nonzero and let the unit restart it rather than loop internally.", "anchors": ["packaging/tracelet.service", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f11", "text": "Protobuf field numbers in the envelope message must never be reused or renumbered, since buffered data on disk from older agent versions is decoded with the new schema.", "anchors": ["proto/tracelet/v1/envelope.proto"], "label": 0, "source": "random"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "same as before", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f34", "text": "On shutdown the pipeline must flush in-flight batches into the disk buffer before exiting; skipping that after a SIGTERM loses the last few seconds of telemetry.", "anchors": ["src/pipeline.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f28", "text": "Run `cargo deny check` locally before adding or upgrading dependencies to catch license and advisory failures that CI would flag.", "anchors": ["deny.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f26", "text": "The toolchain is pinned via rust-toolchain.toml so CI, releases and local builds use the same compiler version.", "anchors": ["rust-toolchain.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f18", "text": "Run `cargo bench --bench pipeline_bench` to measure pipeline throughput before and after changes to batching or serialization.", "anchors": ["benches/pipeline_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f15", "text": "Disk queue file writes must be fsynced/renamed atomically; a crash mid-write otherwise leaves a truncated tail segment that has to be tolerated on startup.", "anchors": ["src/buffer/disk_queue.rs", "tests/disk_queue_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f12", "text": "Buffered batches on disk are serialized as the Envelope proto; adding a required-like semantic field without a default breaks replay of old queue segments after upgrade.", "anchors": ["proto/tracelet/v1/envelope.proto", "src/buffer/disk_queue.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f21", "text": "Exporter requests must have a timeout so a hung endpoint cannot stall the pipeline's flush task.", "anchors": ["src/exporters/otlp.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f07", "text": "Changing the struct layout of events emitted in bpf/net_trace.bpf.c requires a matching change to the event decoding in src/collectors/net_trace.rs, or events will be parsed with wrong offsets.", "anchors": ["bpf/net_trace.bpf.c", "src/collectors/net_trace.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0105", "query": "that works", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0105-f08", "text": "Loading the eBPF program needs CAP_BPF/CAP_PERFMON (or root); the systemd unit must grant these capabilities for network tracing to work.", "anchors": ["packaging/tracelet.service", "src/collectors/net_trace.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f27", "text": "cargo-deny is enforced for licenses and advisories; adding a dependency with a license not allowed in deny.toml will fail CI.", "anchors": ["deny.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f30", "text": "CI runners need clang and libbpf headers installed to build the BPF object in build.rs; a missing toolchain shows up as a build script failure rather than a Rust compile error.", "anchors": ["github/workflows/ci.yml", "build.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f14", "text": "The disk queue has a configured maximum size; when it is full the oldest segments are dropped rather than blocking collectors, so host workloads are never stalled.", "anchors": ["src/buffer/disk_queue.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f24", "text": "The log tailer must persist or track read offsets so restarts neither re-send entire files nor skip lines, and must use async file IO to avoid blocking Tokio worker threads.", "anchors": ["src/collectors/log_tail.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f25", "text": "Blocking syscalls or heavy parsing inside collectors must go through spawn_blocking; running them on Tokio worker threads starves the pipeline and exporter tasks.", "anchors": ["src/collectors/host_metrics.rs", "src/collectors/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f29", "text": "CI (build, test, lint) is defined in github/workflows/ci.yml, while release artifact building and publishing is in github/workflows/release.yml.", "anchors": ["github/workflows/ci.yml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0105-f03", "text": "src/pipeline.rs is the central stage between collectors and exporters: it batches telemetry, applies backpressure and hands batches to the disk buffer or exporter.", "anchors": ["src/pipeline.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f05", "text": "The local persistence layer is split into src/buffer/mod.rs (public buffer interface) and src/buffer/disk_queue.rs (the on-disk queue implementation).", "anchors": ["src/buffer/mod.rs", "src/buffer/disk_queue.rs"], "label": 0, "source": "random"}, {"fact_id": "p0105-f16", "text": "Run the disk queue crash-recovery and ordering tests with `cargo test --test disk_queue_test`; they use temp directories and do not need root.", "anchors": ["tests/disk_queue_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my new --verbose option isn't picked up, where do I even add options?", "query_type": "natural", "positives": ["p0121-f01"], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I want to add a new option to the command, which file gets the setup code?", "query_type": "natural", "positives": ["p0121-f01"], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where do new flags go, the cli file or the entry point?", "query_type": "natural", "positives": ["p0121-f01"], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "adding a new opt, which file for it lol", "query_type": "messy", "positives": ["p0121-f01"], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I want to support a new log layout, what's the procedure to plug it in?", "query_type": "natural", "positives": ["p0121-f02"], "candidates": [{"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I teach the tool to read yet another kind of log lines?", "query_type": "natural", "positives": ["p0121-f02"], "candidates": [{"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I add support for a new log format, which module?", "query_type": "natural", "positives": ["p0121-f02"], "candidates": [{"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "wanna read yet another log kind, where do i hook it up", "query_type": "messy", "positives": ["p0121-f02"], "candidates": [{"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "every component makes its own error type, how should errors be shared across the project?", "query_type": "natural", "positives": ["p0121-f03"], "candidates": [{"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the same kind of failure is described differently in each part of the codebase, what's the convention?", "query_type": "natural", "positives": ["p0121-f03"], "candidates": [{"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "which file should new error variants go in, the error enum place?", "query_type": "natural", "positives": ["p0121-f03"], "candidates": [{"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where do errs live, every file has its own??", "query_type": "messy", "positives": ["p0121-f03"], "candidates": [{"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the matching code keeps writing to the terminal, why is printing scattered?", "query_type": "natural", "positives": ["p0121-f04"], "candidates": [{"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I want to change how results look when printed, which part handles that?", "query_type": "natural", "positives": ["p0121-f04"], "candidates": [{"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where does the table formatting happen?", "query_type": "natural", "positives": ["p0121-f04"], "candidates": [{"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where does the pretty printing code live, cant find it", "query_type": "messy", "positives": ["p0121-f04"], "candidates": [{"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how does the report tally how many entries per severity and most common keys?", "query_type": "natural", "positives": ["p0121-f05"], "candidates": [{"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the totals in my stats subcommand look wrong, where is that math?", "query_type": "natural", "positives": ["p0121-f05"], "candidates": [{"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where's the summary math, bucketing by time?", "query_type": "natural", "positives": ["p0121-f05"], "candidates": [{"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "stats thing, where the time chunks get grouped", "query_type": "messy", "positives": ["p0121-f05"], "candidates": [{"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "running out of RAM on a multi-GB log, what's eating it?", "query_type": "natural", "positives": ["p0121-f06"], "candidates": [{"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how should I iterate over huge files without the process getting killed?", "query_type": "natural", "positives": ["p0121-f06"], "candidates": [{"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "is it ok to slurp the entire file at once, memory-wise?", "query_type": "natural", "positives": ["p0121-f06"], "candidates": [{"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "huge file crashes box, ram spikes, fix?", "query_type": "messy", "positives": ["p0121-f06"], "candidates": [{"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "one garbage line in my log kills the entire run, how do I make it keep going?", "query_type": "natural", "positives": ["p0121-f07"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the scan stops halfway the moment it hits a broken record, I expected it to skip that and continue", "query_type": "natural", "positives": ["p0121-f07"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "make bad lines get skipped instead of stopping the scan, any switch for that?", "query_type": "natural", "positives": ["p0121-f07"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "bad json line stops everything, want skip + count", "query_type": "messy", "positives": ["p0121-f07"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my slice results change depending on which laptop or CI runner runs it", "query_type": "natural", "positives": ["p0121-f08"], "candidates": [{"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "dates without an offset land a few hours off in my tests, why?", "query_type": "natural", "positives": ["p0121-f08"], "candidates": [{"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "times without timezone info, does the parser assume local?", "query_type": "natural", "positives": ["p0121-f08"], "candidates": [{"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "tests pass locally but fail on ci, time stuff off by hours", "query_type": "messy", "positives": ["p0121-f08"], "candidates": [{"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "two consecutive time windows show the same line at the seam, is that expected?", "query_type": "natural", "positives": ["p0121-f09"], "candidates": [{"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I split a log into back-to-back windows and one entry appears in both, why", "query_type": "natural", "positives": ["p0121-f09"], "candidates": [{"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "does the window end include the stop timestamp?", "query_type": "natural", "positives": ["p0121-f09"], "candidates": [{"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "same entry shows up in 2 back to back ranges?? edge thing", "query_type": "messy", "positives": ["p0121-f09"], "candidates": [{"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "a user search pattern made the tool hang forever on a big file, how is that prevented?", "query_type": "natural", "positives": ["p0121-f10"], "candidates": [{"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why can't I match a repeated word using the same captured group?", "query_type": "natural", "positives": ["p0121-f10"], "candidates": [{"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "lookbehind won't work in the search expression, is that on purpose?", "query_type": "natural", "positives": ["p0121-f10"], "candidates": [{"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why cant i do lookahead in the search thing, on purpose?", "query_type": "messy", "positives": ["p0121-f10"], "candidates": [{"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "search got dramatically slower after I added the option, the per-row cost jumped", "query_type": "natural", "positives": ["p0121-f11"], "candidates": [{"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CPU usage spikes during a grep-like run, every row seems to redo setup work", "query_type": "natural", "positives": ["p0121-f11"], "candidates": [{"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "is it slow to build the matcher inside the loop, should it go outside?", "query_type": "natural", "positives": ["p0121-f11"], "candidates": [{"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why is my search so slow, rebuilding the thing every line?", "query_type": "messy", "positives": ["p0121-f11"], "candidates": [{"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I measure if my change made the parsing core slower?", "query_type": "natural", "positives": ["p0121-f12"], "candidates": [{"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "what's the command to run performance tests for the hot code?", "query_type": "natural", "positives": ["p0121-f12"], "candidates": [{"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "is there a bench I should run before touching json handling?", "query_type": "natural", "positives": ["p0121-f12"], "candidates": [{"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how to check perf before i touch the json stuff, command?", "query_type": "messy", "positives": ["p0121-f12"], "candidates": [{"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "tests take forever because each run builds big input files on the fly", "query_type": "natural", "positives": ["p0121-f13"], "candidates": [{"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I add an end-to-end check that runs the real executable on example input?", "query_type": "natural", "positives": ["p0121-f13"], "candidates": [{"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where should new end-to-end test data go, the test folder?", "query_type": "natural", "positives": ["p0121-f13"], "candidates": [{"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "adding a test that needs input, where do i put the file", "query_type": "messy", "positives": ["p0121-f13"], "candidates": [{"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where do I write tests for matching records on a key value, not through the command line?", "query_type": "natural", "positives": ["p0121-f14"], "candidates": [{"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I want to test match logic without spawning the program, where?", "query_type": "natural", "positives": ["p0121-f14"], "candidates": [{"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where do tests for the regex side of record matching go, filter?", "query_type": "natural", "positives": ["p0121-f14"], "candidates": [{"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "unit tests for time match stuff, which file lol", "query_type": "messy", "positives": ["p0121-f14"], "candidates": [{"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "after I tweak the json input the cross-encoding test fails, why?", "query_type": "natural", "positives": ["p0121-f15"], "candidates": [{"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "same records written in two encodings must match, but my edit broke that", "query_type": "natural", "positives": ["p0121-f15"], "candidates": [{"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "every time I touch one of the example files I have to mirror it, how?", "query_type": "natural", "positives": ["p0121-f15"], "candidates": [{"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "test red after i edited a log file, the other one needs same stuff?", "query_type": "messy", "positives": ["p0121-f15"], "candidates": [{"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I set a value in my settings file but the command ignores it", "query_type": "natural", "positives": ["p0121-f16"], "candidates": [{"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my settings change does nothing after restart", "query_type": "natural", "positives": ["p0121-f16"], "candidates": [{"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "config file vs command line, who wins?", "query_type": "natural", "positives": ["p0121-f16"], "candidates": [{"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my toml setting ignored? cli wins i guess??", "query_type": "messy", "positives": ["p0121-f16"], "candidates": [{"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI fails on lint stuff that my machine didn't complain about", "query_type": "natural", "positives": ["p0121-f17"], "candidates": [{"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my pull request bounces for a code smell I never saw before merging", "query_type": "natural", "positives": ["p0121-f17"], "candidates": [{"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the lint config for CI, can I run it before pushing?", "query_type": "natural", "positives": ["p0121-f17"], "candidates": [{"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "ci red bc of a lint, what do i run before push", "query_type": "messy", "positives": ["p0121-f17"], "candidates": [{"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI fails with my code looking fine to me, what's the style check?", "query_type": "natural", "positives": ["p0121-f18"], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my PR bounces because of whitespace, how do I match the house style?", "query_type": "natural", "positives": ["p0121-f18"], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI complains about spacing, is the rustfmt config checked?", "query_type": "natural", "positives": ["p0121-f18"], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "ci yelled about spacing again, how do i make it happy", "query_type": "messy", "positives": ["p0121-f18"], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I ship a new build so downloads exist for every platform?", "query_type": "natural", "positives": ["p0121-f19"], "candidates": [{"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "what do I do before making the tag so the release notes are right?", "query_type": "natural", "positives": ["p0121-f19"], "candidates": [{"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "where do release notes get written for the next publish?", "query_type": "natural", "positives": ["p0121-f19"], "candidates": [{"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "publishing new build, what file to update first", "query_type": "messy", "positives": ["p0121-f19"], "candidates": [{"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI builds keep getting different dependency resolutions than my laptop", "query_type": "natural", "positives": ["p0121-f20"], "candidates": [{"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "after I bumped a crate, CI still builds different code, what did I forget?", "query_type": "natural", "positives": ["p0121-f20"], "candidates": [{"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "should the lock file be in git for this app?", "query_type": "natural", "positives": ["p0121-f20"], "candidates": [{"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "forgot to push something after bumping a crate, ci differs", "query_type": "messy", "positives": ["p0121-f20"], "candidates": [{"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why is there an async runtime dependency at all when the work is plain computation?", "query_type": "natural", "positives": ["p0121-f21"], "candidates": [{"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "we're using futures and tasks for input, does the matching get async too?", "query_type": "natural", "positives": ["p0121-f21"], "candidates": [{"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "is it ok to make the core code async, or should it stay plain?", "query_type": "natural", "positives": ["p0121-f21"], "candidates": [{"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why async everywhere, runtime is tokio right, is the core async too", "query_type": "messy", "positives": ["p0121-f21"], "candidates": [{"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I match a value inside a sub-object in a JSON record?", "query_type": "natural", "positives": ["p0121-f22"], "candidates": [{"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I'd like to filter on a key inside a child map, dots or brackets?", "query_type": "natural", "positives": ["p0121-f22"], "candidates": [{"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how to reference an inner key like the one under http in the field selector?", "query_type": "natural", "positives": ["p0121-f22"], "candidates": [{"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "filter on json inner key w/ dot?? doesnt work", "query_type": "messy", "positives": ["p0121-f22"], "candidates": [{"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my filter on a message with a double quote inside finds zero matches", "query_type": "natural", "positives": ["p0121-f23"], "candidates": [{"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "lines with an escaped double quote never show up when I search for them", "query_type": "natural", "positives": ["p0121-f23"], "candidates": [{"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "values with backslash-escaped quotes don't match equality, bug?", "query_type": "natural", "positives": ["p0121-f23"], "candidates": [{"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "search for text with double-quote chars inside finds nothing in kv files", "query_type": "messy", "positives": ["p0121-f23"], "candidates": [{"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "a time filter works on json but not on the other log type, why", "query_type": "natural", "positives": ["p0121-f24"], "candidates": [{"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "each log layout has its own date handling, can the time cutoff ignore that?", "query_type": "natural", "positives": ["p0121-f24"], "candidates": [{"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "time bounds code shouldn't care about the source, how is that handled?", "query_type": "natural", "positives": ["p0121-f24"], "candidates": [{"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "time slicing breaks on logfmt, dates differ per file type?", "query_type": "messy", "positives": ["p0121-f24"], "candidates": [{"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the report shuffles rows between runs and my golden-file comparison keeps failing", "query_type": "natural", "positives": ["p0121-f25"], "candidates": [{"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "why are the counts listed in a different sequence every time I run it?", "query_type": "natural", "positives": ["p0121-f25"], "candidates": [{"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the summary order: is it guaranteed or random?", "query_type": "natural", "positives": ["p0121-f25"], "candidates": [{"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "report rows jump around, test flaky, sort?", "query_type": "messy", "positives": ["p0121-f25"], "candidates": [{"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "when I cut the run short with head I get a scary message at the end", "query_type": "natural", "positives": ["p0121-f26"], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "exit noise when a downstream tool closes early, want silence", "query_type": "natural", "positives": ["p0121-f26"], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the program complains when the reader closes after head, is that a bug?", "query_type": "natural", "positives": ["p0121-f26"], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "head cuts it off and then error msg spams, fix pls", "query_type": "messy", "positives": ["p0121-f26"], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I'm adding a new option to restrict by status, which places do I touch?", "query_type": "natural", "positives": ["p0121-f27"], "candidates": [{"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I add another narrowing switch to the tool end to end, what's the checklist?", "query_type": "natural", "positives": ["p0121-f27"], "candidates": [{"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "adding a new filter option, what do I need to touch?", "query_type": "natural", "positives": ["p0121-f27"], "candidates": [{"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "new narrowing opt, where add it + test", "query_type": "messy", "positives": ["p0121-f27"], "candidates": [{"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "my automation can't tell a bad invocation from a missing file, both give the same status", "query_type": "natural", "positives": ["p0121-f28"], "candidates": [{"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI can't distinguish bad arguments from disk problems by return value", "query_type": "natural", "positives": ["p0121-f28"], "candidates": [{"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how are error kinds turned into process return values?", "query_type": "natural", "positives": ["p0121-f28"], "candidates": [{"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "all failures return 1?? want diff codes for input errs", "query_type": "messy", "positives": ["p0121-f28"], "candidates": [{"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "stdin input and tail-from-end mode don't mix, error appears", "query_type": "natural", "positives": ["p0121-f29"], "candidates": [{"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "can I pass input through a dash on the command line?", "query_type": "natural", "positives": ["p0121-f29"], "candidates": [{"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "reading from stdin, why can't I jump backwards in it?", "query_type": "natural", "positives": ["p0121-f29"], "candidates": [{"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "stdin + go backwards thing fails, why", "query_type": "messy", "positives": ["p0121-f29"], "candidates": [{"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I passed the same option twice expecting either to match, but both must hold", "query_type": "natural", "positives": ["p0121-f30"], "candidates": [{"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "how do I express this OR that for one key in the query?", "query_type": "natural", "positives": ["p0121-f30"], "candidates": [{"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "is combining conditions AND by default, and how do I get OR?", "query_type": "natural", "positives": ["p0121-f30"], "candidates": [{"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "or logic for two level args? mine acts like and", "query_type": "messy", "positives": ["p0121-f30"], "candidates": [{"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I added a flag but the help docs in the repo don't show it", "query_type": "natural", "positives": ["p0121-f31"], "candidates": [{"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "users asking what options exist, where's the list I should update?", "query_type": "natural", "positives": ["p0121-f31"], "candidates": [{"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "after adding an option, do I need to update the docs too?", "query_type": "natural", "positives": ["p0121-f31"], "candidates": [{"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "docs out of date after adding opt, update where?", "query_type": "messy", "positives": ["p0121-f31"], "candidates": [{"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "crash when a log file has non-ascii junk in some line", "query_type": "natural", "positives": ["p0121-f32"], "candidates": [{"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "a garbage character in one row makes the whole scan error out", "query_type": "natural", "positives": ["p0121-f32"], "candidates": [{"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "the line reader panics on binary junk, shouldn't it just replace it?", "query_type": "natural", "positives": ["p0121-f32"], "candidates": [{"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "weird encoding in a log row kills run, latin1 stuff", "query_type": "messy", "positives": ["p0121-f32"], "candidates": [{"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "bad json lines get skipped now but my nested field filter still errors, why", "query_type": "natural", "positives": ["p0121-f07", "p0121-f22"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "time filter on logfmt skips a line that has a bad timestamp, should the run continue?", "query_type": "natural", "positives": ["p0121-f07", "p0121-f24"], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "adding a new filter option: where do I also document it?", "query_type": "natural", "positives": ["p0121-f27", "p0121-f31"], "candidates": [{"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CI complains about format and lint, which config files control those?", "query_type": "natural", "positives": ["p0121-f17", "p0121-f18"], "candidates": [{"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "stdout closed early gives nothing but exit code, how do scripts differ?", "query_type": "natural", "positives": ["p0121-f26", "p0121-f28"], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "I compile the regex once outside the loop, does that change the benchmark baseline?", "query_type": "natural", "positives": ["p0121-f11", "p0121-f12"], "candidates": [{"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "adding a fixture for a new format test, should it also get a jsonl twin?", "query_type": "natural", "positives": ["p0121-f02", "p0121-f15"], "candidates": [{"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "CLI option and config file both set the same thing, is my option definition the place?", "query_type": "natural", "positives": ["p0121-f01", "p0121-f16"], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f25", "text": "Summary output defaults to deterministic ordering (sorted by count then key) so results are stable for snapshot tests.", "anchors": ["src/summary.rs", "tests/cli_basic.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "reading stdin with a bad utf8 byte, does it still stream without loading all?", "query_type": "natural", "positives": ["p0121-f06", "p0121-f29", "p0121-f32"], "candidates": [{"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f30", "text": "Multiple filters combine with AND semantics by default; OR requires repeating a field flag with alternative values in the filter module.", "anchors": ["src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "sounds right", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "do it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f31", "text": "README.md documents user-facing flags and examples; keep it in sync when changing the clap definitions in cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "yes", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f27", "text": "To add a new filter flag: define it in src/cli.rs, add the predicate in src/filter.rs, and cover it in tests/filter_tests.rs.", "anchors": ["src/cli.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f12", "text": "Run the parser benchmarks with `cargo bench --bench parse_bench`; compare against a saved baseline before changing the JSON or logfmt hot paths.", "anchors": ["benches/parse_bench.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f14", "text": "Filter predicate behavior (field equality, regex, time) is unit tested in tests/filter_tests.rs, separately from CLI-level tests.", "anchors": ["tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "that works", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f19", "text": "Releases are built by the release workflow, which produces binaries per target; update CHANGELOG.md before tagging a version.", "anchors": ["github/workflows/release.yml", "CHANGELOG.md"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "ok", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f21", "text": "Tokio is used for async input and concurrent file reading, but the parsing and filtering core stays synchronous and CPU-bound to keep it simple to test and bench.", "anchors": ["src/reader.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f13", "text": "Integration tests invoke the compiled binary and read the sample logs from tests/fixtures/; add new cases there rather than generating large files at test time.", "anchors": ["tests/cli_basic.rs", "tests/fixtures/sample.jsonl"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f22", "text": "JSON log lines with nested objects are addressed using dotted field paths (e.g. `http.status`); flat logfmt keys that contain dots need to match the same path syntax.", "anchors": ["src/parser/json.rs", "src/filter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f03", "text": "All error types are centralized in src/error.rs; other modules return its Result alias rather than defining their own error enums.", "anchors": ["src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f16", "text": "Config file loading is in src/config.rs, and precedence is CLI flags over config file over built-in defaults.", "anchors": ["src/config.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f04", "text": "Output rendering (plain lines, JSON, table) is isolated in src/output.rs so filter and summary code never print directly.", "anchors": ["src/output.rs", "src/filter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "alright", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f06", "text": "Large files must be read as a stream line by line through the reader; never load the whole file into memory, since inputs can be many GB.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f24", "text": "Timestamps in parsed records are normalized to a common type in the parser layer so time_range.rs does not need to know the source format.", "anchors": ["src/parser/mod.rs", "src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f26", "text": "When writing to stdout, a broken pipe (e.g. `logslice ... | head`) should exit quietly rather than print an error; handle it in the output layer.", "anchors": ["src/output.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "go", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f01", "text": "CLI argument definitions (clap derive structs for subcommands and flags) live in src/cli.rs; main.rs only parses them and dispatches, so new flags go in cli.rs first.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f29", "text": "Reading from stdin must be supported with `-` as the path; the reader treats it specially and cannot seek, so features like reverse scanning are unavailable there.", "anchors": ["src/reader.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f17", "text": "Clippy settings in clippy.toml are enforced in CI, so warnings fail the build; run `cargo clippy --all-targets` locally first.", "anchors": ["clippy.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f20", "text": "Cargo.lock is committed because this is a binary crate; remember to commit lockfile updates after changing dependencies so CI uses `--locked` builds consistently.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f07", "text": "A single malformed line must not abort the run: parsers return a per-line error that the reader counts and skips unless strict mode is set. Propagating it with `?` in the loop would kill the whole scan.", "anchors": ["src/reader.rs", "src/parser/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f05", "text": "Aggregation logic for the summarize command (counts per level, top field values, time buckets) lives in src/summary.rs.", "anchors": ["src/summary.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "random"}]} {"project_id": "p0121", "query": "go on", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0121-f32", "text": "Invalid UTF-8 bytes in log lines are handled lossily when reading so one bad byte does not fail the line; avoid `read_line` into a String that errors on invalid UTF-8.", "anchors": ["src/reader.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f23", "text": "logfmt values may be quoted with escaped quotes; the parser must unescape them before comparison or filters on quoted values never match.", "anchors": ["src/parser/logfmt.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f15", "text": "Fixtures sample.jsonl and sample.logfmt must describe the same events, because tests compare results across formats. Editing one without the other breaks parity tests.", "anchors": ["tests/fixtures/sample.jsonl", "tests/fixtures/sample.logfmt"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f10", "text": "Regex matching uses the `regex` crate (linear-time, no backreferences) deliberately, so user-supplied patterns can never cause catastrophic backtracking on huge logs.", "anchors": ["src/filter.rs", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f28", "text": "Exit codes are mapped from error variants in main.rs: distinct nonzero codes for usage errors versus I/O errors, which scripts rely on.", "anchors": ["src/main.rs", "src/error.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f08", "text": "Time range parsing treats timestamps without a timezone offset as UTC; assuming local time gives off-by-hours slices in tests and on CI machines.", "anchors": ["src/time_range.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f02", "text": "Log format parsers sit under src/parser/, with one file per format (json.rs, logfmt.rs) and format selection/dispatch in src/parser/mod.rs. To add a new format, add a sibling module and register it in mod.rs.", "anchors": ["src/parser/mod.rs", "src/parser/json.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0121-f11", "text": "Compile user regex patterns once before the read loop; compiling per line made filtering orders of magnitude slower in benchmarks.", "anchors": ["src/filter.rs", "benches/parse_bench.rs"], "label": 0, "source": "random"}, {"fact_id": "p0121-f18", "text": "Formatting is checked in CI via `cargo fmt --check` using the options in rustfmt.toml; unformatted code fails the pipeline.", "anchors": ["rustfmt.toml", "github/workflows/ci.yml"], "label": 0, "source": "random"}, {"fact_id": "p0121-f09", "text": "Time range bounds are start-inclusive and end-exclusive, so adjacent slices do not duplicate boundary lines.", "anchors": ["src/time_range.rs", "tests/filter_tests.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where do I go to add or change which flags the tool accepts on the command line?", "query_type": "natural", "positives": ["p0196-f01"], "candidates": [{"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "the startup file only seems to hand off work, where's the real flag logic hiding?", "query_type": "natural", "positives": ["p0196-f01"], "candidates": [{"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where is the code that defines the flags and build/serve commands, the actual logic?", "query_type": "natural", "positives": ["p0196-f01"], "candidates": [{"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "wher r the flags defined, cant find it in startup", "query_type": "messy", "positives": ["p0196-f01"], "candidates": [{"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my new setting in the project file gets ignored, where does the code read those values?", "query_type": "natural", "positives": ["p0196-f02"], "candidates": [{"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do I get the tool to honor an extra option I put in the settings file?", "query_type": "natural", "positives": ["p0196-f02"], "candidates": [{"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where do settings get loaded into the code, I want to add a new option and write docs for it", "query_type": "natural", "positives": ["p0196-f02"], "candidates": [{"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "adding a new toggle to the toml thing, where's the parser for it", "query_type": "messy", "positives": ["p0196-f02"], "candidates": [{"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my page metadata block with three dashes at top shows up as text in the output, why", "query_type": "natural", "positives": ["p0196-f03"], "candidates": [{"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does the page header section I wrote in the old format render as visible paragraphs?", "query_type": "natural", "positives": ["p0196-f03"], "candidates": [{"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "page header with --- isn't being read, is it the wrong format?", "query_type": "natural", "positives": ["p0196-f03"], "candidates": [{"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "yaml header on my post shows up on the site lol", "query_type": "messy", "positives": ["p0196-f03"], "candidates": [{"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "build dies with a weird error on one page, no file name in the message, how to tell which page", "query_type": "natural", "positives": ["p0196-f04"], "candidates": [{"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my build crashes with an unhelpful complaint about a section never ending, which file?", "query_type": "natural", "positives": ["p0196-f04"], "candidates": [{"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "error message doesn't say which file is broken, should it?", "query_type": "natural", "positives": ["p0196-f04"], "candidates": [{"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "build blew up cant tell which page broke, no path in error", "query_type": "messy", "positives": ["p0196-f04"], "candidates": [{"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "tables aren't showing up in my posts, where do I turn those on?", "query_type": "natural", "positives": ["p0196-f05"], "candidates": [{"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my ~~struck~~ text stays as raw tildes on the page", "query_type": "natural", "positives": ["p0196-f05"], "candidates": [{"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where is the code turning my write-ups into web markup, I want to enable a feature", "query_type": "natural", "positives": ["p0196-f05"], "candidates": [{"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "tables n strikethru not working in posts", "query_type": "messy", "positives": ["p0196-f05"], "candidates": [{"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how does a single post's metadata end up combined with its body before the template sees it?", "query_type": "natural", "positives": ["p0196-f06"], "candidates": [{"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "what's the struct that wraps a post's header and text for the template step?", "query_type": "natural", "positives": ["p0196-f06"], "candidates": [{"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "which module glues the header parsing and text conversion into one object?", "query_type": "natural", "positives": ["p0196-f06"], "candidates": [{"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where does a post get bundled up before the template stuff", "query_type": "messy", "positives": ["p0196-f06"], "candidates": [{"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I added a helper for my layouts but the layout engine can't call it, where do I hook it in?", "query_type": "natural", "positives": ["p0196-f07"], "candidates": [{"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "custom shortcode-like helper not available in my theme files, what's wrong", "query_type": "natural", "positives": ["p0196-f07"], "candidates": [{"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where does the engine set up its layout files and helpers?", "query_type": "natural", "positives": ["p0196-f07"], "candidates": [{"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "theme helper fn not found error, where to add it", "query_type": "messy", "positives": ["p0196-f07"], "candidates": [{"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my post body shows raw angle brackets and tags instead of formatted html", "query_type": "natural", "positives": ["p0196-f08"], "candidates": [{"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "all my post HTML appears as literal code on the page, what do I wrap it with?", "query_type": "natural", "positives": ["p0196-f08"], "candidates": [{"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "post html comes out as text with brackets, is there a special marker needed in the layout?", "query_type": "natural", "positives": ["p0196-f08"], "candidates": [{"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "html in posts looks like code lol fix", "query_type": "messy", "positives": ["p0196-f08"], "candidates": [{"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "every CI run rebuilds the whole site even though nothing changed, why?", "query_type": "natural", "positives": ["p0196-f09"], "candidates": [{"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after a fresh clone the site rebuilds everything, the cache is useless", "query_type": "natural", "positives": ["p0196-f09"], "candidates": [{"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does the incremental cache check file contents instead of timestamps?", "query_type": "natural", "positives": ["p0196-f09"], "candidates": [{"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "ci keeps rebuilding all pages even tho files same", "query_type": "messy", "positives": ["p0196-f09"], "candidates": [{"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I tweaked a layout file and the output for untouched pages still looks old", "query_type": "natural", "positives": ["p0196-f10"], "candidates": [{"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after saving a settings change, some pages don't pick it up until I clear cache", "query_type": "natural", "positives": ["p0196-f10"], "candidates": [{"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does changing a layout not refresh everything in the cache?", "query_type": "natural", "positives": ["p0196-f10"], "candidates": [{"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "changed a layout n old pages didnt update, wtf", "query_type": "messy", "positives": ["p0196-f10"], "candidates": [{"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where do generated files land on disk for each URL? I want to change it", "query_type": "natural", "positives": ["p0196-f11"], "candidates": [{"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my post at /about/ ends up in an odd folder, where is that path decided?", "query_type": "natural", "positives": ["p0196-f11"], "candidates": [{"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "which code decides the on-disk location for each generated page?", "query_type": "natural", "positives": ["p0196-f11"], "candidates": [{"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where do the built files go, folder naming weird", "query_type": "messy", "positives": ["p0196-f11"], "candidates": [{"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "dev mode keeps refreshing forever in the browser even when I touch nothing", "query_type": "natural", "positives": ["p0196-f12"], "candidates": [{"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "browser tab reloads in an infinite loop after each build, how to stop", "query_type": "natural", "positives": ["p0196-f12"], "candidates": [{"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does the local preview loop endlessly? the file it writes might be causing it", "query_type": "natural", "positives": ["p0196-f12"], "candidates": [{"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "preview page keeps refreshing itself nonstop", "query_type": "messy", "positives": ["p0196-f12"], "candidates": [{"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "dev server rebuilds nonstop after the first build finishes, what's feeding it events?", "query_type": "natural", "positives": ["p0196-f13"], "candidates": [{"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my local preview keeps churning; is something under the generated folder being monitored?", "query_type": "natural", "positives": ["p0196-f13"], "candidates": [{"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does the auto update go in a loop when the public folder is inside the project?", "query_type": "natural", "positives": ["p0196-f13"], "candidates": [{"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "dev mode loops forever, the public folder maybe", "query_type": "messy", "positives": ["p0196-f13"], "candidates": [{"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "saving a file once kicks off three builds in a row, why", "query_type": "natural", "positives": ["p0196-f14"], "candidates": [{"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "one keystroke in my text editor makes the preview run several times", "query_type": "natural", "positives": ["p0196-f14"], "candidates": [{"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why do I get several reruns each time I hit save in vim?", "query_type": "natural", "positives": ["p0196-f14"], "candidates": [{"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "hit ctrl s and the thing rebuilds 3x wtf", "query_type": "messy", "positives": ["p0196-f14"], "candidates": [{"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where is the code for the browser auto refresh connection in preview mode?", "query_type": "natural", "positives": ["p0196-f15"], "candidates": [{"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my preview tab doesn't update when I save, the live connection seems dead; where's that handled?", "query_type": "natural", "positives": ["p0196-f15"], "candidates": [{"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "which file handles the local web host and its push channel for refreshing pages?", "query_type": "natural", "positives": ["p0196-f15"], "candidates": [{"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "preview doesnt auto refresh, where's the connection code", "query_type": "messy", "positives": ["p0196-f15"], "candidates": [{"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my coworker can open my local preview from their laptop, is that expected?", "query_type": "natural", "positives": ["p0196-f16"], "candidates": [{"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "phone on wifi can reach my dev page, how do I stop it being reachable on the network?", "query_type": "natural", "positives": ["p0196-f16"], "candidates": [{"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why can other machines on my network see the local site preview?", "query_type": "natural", "positives": ["p0196-f16"], "candidates": [{"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "other ppl on wifi can see my preview thing??", "query_type": "messy", "positives": ["p0196-f16"], "candidates": [{"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "a debug snippet shows up in my deployed site's source, how did it get there?", "query_type": "natural", "positives": ["p0196-f17"], "candidates": [{"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why is there extra javascript in the live build files I upload?", "query_type": "natural", "positives": ["p0196-f17"], "candidates": [{"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "found a refresh script in the published pages, where does it come from?", "query_type": "natural", "positives": ["p0196-f17"], "candidates": [{"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "there's random js in my prod html, wtf", "query_type": "messy", "positives": ["p0196-f17"], "candidates": [{"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do I run the end to end checks that build a sample site and verify results?", "query_type": "natural", "positives": ["p0196-f18"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "what's the command to run the full suite that generates a test site and checks it?", "query_type": "natural", "positives": ["p0196-f18"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do I run the full end-to-end test on the sample project?", "query_type": "natural", "positives": ["p0196-f18"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how run e2e tests on sample site thing", "query_type": "messy", "positives": ["p0196-f18"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I fixed a bug where a list rendered wrong, how do I lock that in so it doesn't return?", "query_type": "natural", "positives": ["p0196-f19"], "candidates": [{"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "want a test that catches my formatting bug coming back, where to put the sample text?", "query_type": "natural", "positives": ["p0196-f19"], "candidates": [{"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do I add a test for a bug in how posts display? I want to check the resulting page", "query_type": "natural", "positives": ["p0196-f19"], "candidates": [{"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "need test so this bug stays dead, where put input", "query_type": "messy", "positives": ["p0196-f19"], "candidates": [{"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where do the quick isolated checks for the page header parsing live?", "query_type": "natural", "positives": ["p0196-f20"], "candidates": [{"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my header parser tests keep being mixed with the full site tests, where are they?", "query_type": "natural", "positives": ["p0196-f20"], "candidates": [{"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "which test file covers the header block reading, not the whole site run?", "query_type": "natural", "positives": ["p0196-f20"], "candidates": [{"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where r header parse tests", "query_type": "messy", "positives": ["p0196-f20"], "candidates": [{"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I changed a setting in the docs but the sample blog settings still have the old value, which file to update", "query_type": "natural", "positives": ["p0196-f21"], "candidates": [{"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "is there a blog settings example I should keep matching when I add options to the docs?", "query_type": "natural", "positives": ["p0196-f21"], "candidates": [{"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "where's the example blog settings file, it must match the docs", "query_type": "natural", "positives": ["p0196-f21"], "candidates": [{"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "blog example settings out of date?", "query_type": "messy", "positives": ["p0196-f21"], "candidates": [{"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does git still track my build folder? the ignore rule seems right", "query_type": "natural", "positives": ["p0196-f22"], "candidates": [{"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my github actions config folder shows as a plain folder in the repo listing, is it broken?", "query_type": "natural", "positives": ["p0196-f22"], "candidates": [{"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "the ci yaml folder appears without a dot in the layout listing, does that matter?", "query_type": "natural", "positives": ["p0196-f22"], "candidates": [{"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "ci yaml in wrong place? folder shows no dot", "query_type": "messy", "positives": ["p0196-f22"], "candidates": [{"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my push got rejected by the pipeline for style reasons, what do I run first?", "query_type": "natural", "positives": ["p0196-f23"], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "pipeline fails on lint stuff even though it compiles locally, what's the fix", "query_type": "natural", "positives": ["p0196-f23"], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "CI fails on code style; what do I run locally to match it?", "query_type": "natural", "positives": ["p0196-f23"], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "ci red on style lol how fix before push", "query_type": "messy", "positives": ["p0196-f23"], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my diff has spacing changes all over that aren't mine, how to tidy before I record it in git", "query_type": "natural", "positives": ["p0196-f24"], "candidates": [{"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do I make my code look like everyone else's before saving changes?", "query_type": "natural", "positives": ["p0196-f24"], "candidates": [{"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "what command normalizes code layout before I save changes to git?", "query_type": "natural", "positives": ["p0196-f24"], "candidates": [{"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "spacing diff mess, how tidy up before git", "query_type": "messy", "positives": ["p0196-f24"], "candidates": [{"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do the downloadable executables for each operating system get created when I tag?", "query_type": "natural", "positives": ["p0196-f25"], "candidates": [{"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I pushed a tag and nothing got uploaded to the releases page, what runs?", "query_type": "natural", "positives": ["p0196-f25"], "candidates": [{"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "what automation makes platform files and attaches them when I tag a release?", "query_type": "natural", "positives": ["p0196-f25"], "candidates": [{"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "tag pushed, no downloads on releases page, which job", "query_type": "messy", "positives": ["p0196-f25"], "candidates": [{"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "CI fails saying the lock file is out of date after I bumped a crate, what do I do?", "query_type": "natural", "positives": ["p0196-f26"], "candidates": [{"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "is it ok that the lock file is in git for this tool? why?", "query_type": "natural", "positives": ["p0196-f26"], "candidates": [{"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after changing a library version, CI complains; should I update something?", "query_type": "natural", "positives": ["p0196-f26"], "candidates": [{"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "ci says lockfile mismatch after i add crate", "query_type": "messy", "positives": ["p0196-f26"], "candidates": [{"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I tagged v1.4 but the downloads say 1.3 inside, why?", "query_type": "natural", "positives": ["p0196-f27"], "candidates": [{"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "the number printed by the built program doesn't match the tag i pushed", "query_type": "natural", "positives": ["p0196-f27"], "candidates": [{"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after I raise the number in the manifest, what else has to agree with the tag?", "query_type": "natural", "positives": ["p0196-f27"], "candidates": [{"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "tag says 2.0 but binary says 1.9 smh", "query_type": "messy", "positives": ["p0196-f27"], "candidates": [{"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my test site shows a blank page with no layout, what's missing from the sample project?", "query_type": "natural", "positives": ["p0196-f28"], "candidates": [{"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "the example site fails to render its page wrapper, what file does it need?", "query_type": "natural", "positives": ["p0196-f28"], "candidates": [{"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why does the sample site come out empty, its wrapper file missing?", "query_type": "natural", "positives": ["p0196-f28"], "candidates": [{"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "test site blank output, missing wrapper?", "query_type": "messy", "positives": ["p0196-f28"], "candidates": [{"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I want to customize only the header part of my layout without copying everything; how?", "query_type": "natural", "positives": ["p0196-f29"], "candidates": [{"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how much of the page do I need to redefine in a child layout to change just one section?", "query_type": "natural", "positives": ["p0196-f29"], "candidates": [{"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how do child layouts reuse the main shell?", "query_type": "natural", "positives": ["p0196-f29"], "candidates": [{"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how to change only one bit of the page layout", "query_type": "messy", "positives": ["p0196-f29"], "candidates": [{"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "running the tool from inside a subfolder breaks paths, files go to the wrong place", "query_type": "natural", "positives": ["p0196-f30"], "candidates": [{"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I ran the build in another folder and it can't find my posts", "query_type": "natural", "positives": ["p0196-f30"], "candidates": [{"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "why do my content paths only work from the project root? I'd like to run from anywhere in the repo", "query_type": "natural", "positives": ["p0196-f30"], "candidates": [{"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "run from subfolder and it cant find pages", "query_type": "messy", "positives": ["p0196-f30"], "candidates": [{"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I want a new command for the tool; what all do I need to touch?", "query_type": "natural", "positives": ["p0196-f31"], "candidates": [{"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "added a new verb to the command line but it says unknown; what's missing", "query_type": "natural", "positives": ["p0196-f31"], "candidates": [{"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "how to wire up another action on the command line in the code", "query_type": "natural", "positives": ["p0196-f31"], "candidates": [{"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "new cli verb not recognized, where to add", "query_type": "messy", "positives": ["p0196-f31"], "candidates": [{"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "a post I marked hidden still appears in the deployed site, but shows locally. why?", "query_type": "natural", "positives": ["p0196-f32"], "candidates": [{"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my unfinished article shows up in preview but not in the live output, expected?", "query_type": "natural", "positives": ["p0196-f32"], "candidates": [{"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "post set to hidden doesn't go live but preview shows it, which code checks that?", "query_type": "natural", "positives": ["p0196-f32"], "candidates": [{"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "hidden article in preview but not deploy?", "query_type": "messy", "positives": ["p0196-f32"], "candidates": [{"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "new option I added isn't mentioned anywhere newcomers would look, where's the intro doc?", "query_type": "natural", "positives": ["p0196-f33"], "candidates": [{"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "people keep asking how to run it, the top doc still shows old options, what to update?", "query_type": "natural", "positives": ["p0196-f33"], "candidates": [{"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after I changed the arguments, which top-level doc needs the new options?", "query_type": "natural", "positives": ["p0196-f33"], "candidates": [{"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "front page of repo still shows old command options", "query_type": "messy", "positives": ["p0196-f33"], "candidates": [{"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "after I add a config key, do I need to update the sample blog config as well as the docs?", "query_type": "natural", "positives": ["p0196-f02", "p0196-f21"], "candidates": [{"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "dev preview keeps reloading in a loop and listens on the network; anything to check on the server?", "query_type": "natural", "positives": ["p0196-f12", "p0196-f16"], "candidates": [{"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "my template edit isn't showing up even after a rebuild; cache problem or escaping?", "query_type": "natural", "positives": ["p0196-f08", "p0196-f10"], "candidates": [{"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f07", "text": "Tera template loading and custom filters/functions are registered in src/render/templates.rs; src/render/mod.rs drives rendering of pages into output strings.", "anchors": ["src/render/templates.rs", "src/render/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I added a new command and its flag, does the top-level readme need it too?", "query_type": "natural", "positives": ["p0196-f31", "p0196-f33"], "candidates": [{"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f01", "text": "The entry point src/main.rs only parses CLI args and dispatches to build or serve; the actual argument definitions and subcommands live in src/cli.rs.", "anchors": ["src/main.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f02", "text": "Site configuration is deserialized from inkwell.toml into structs in src/config.rs; add new config keys there and document them in docs/configuration.md.", "anchors": ["src/config.rs", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "cargo test on the integration suite fails after I bumped a dependency, could the lockfile be why?", "query_type": "natural", "positives": ["p0196-f18", "p0196-f26"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "page header error with no file in the message, and where does its unit test go?", "query_type": "natural", "positives": ["p0196-f04", "p0196-f20"], "candidates": [{"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I added a bug regression sample and need to run it, which command?", "query_type": "natural", "positives": ["p0196-f18", "p0196-f19"], "candidates": [{"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "draft pages show in preview but not live, and the watcher keeps retriggering on my public folder", "query_type": "natural", "positives": ["p0196-f13", "p0196-f32"], "candidates": [{"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "I tagged a release but the version inside is old, and the format check fails before I tag", "query_type": "natural", "positives": ["p0196-f23", "p0196-f27"], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 1, "source": "positive"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "whatever you think", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "yep", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f18", "text": "Run the integration tests with `cargo test --test build_integration`; they build tests/fixtures/basic_site end to end and compare output.", "anchors": ["tests/build_integration.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f15", "text": "The live-reload dev server and its websocket/SSE reload endpoint are implemented in src/serve/server.rs.", "anchors": ["src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "looks fine", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f03", "text": "Front matter must be TOML delimited by +++ lines; YAML-style --- front matter is not parsed and is treated as page body.", "anchors": ["src/content/frontmatter.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f21", "text": "examples/blog/inkwell.toml is a sample config showing a realistic blog setup and should be kept in sync with the options in docs/configuration.md.", "anchors": ["examples/blog/inkwell.toml", "docs/configuration.md"], "label": 0, "source": "random"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "go for it", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f12", "text": "The writer skips writing a file when its bytes are unchanged, so the dev server's watcher does not trigger endless reload loops from its own output.", "anchors": ["src/build/writer.rs", "src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f31", "text": "To add a new CLI subcommand, add a variant in src/cli.rs and handle it in the match in src/main.rs.", "anchors": ["src/cli.rs", "src/main.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f11", "text": "Output file writing is isolated in src/build/writer.rs, which maps a page's URL to its destination path under the output directory.", "anchors": ["src/build/writer.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "let's do that", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f29", "text": "Content is rendered through a single base template that child templates extend, keeping theme overrides to block-level changes.", "anchors": ["tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f06", "text": "src/content/mod.rs ties front matter and Markdown together into a Page type that the renderer consumes.", "anchors": ["src/content/mod.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "sounds right", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f14", "text": "Editors emit bursts of save events (temp files, renames), so watcher events must be debounced before triggering a rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f16", "text": "The dev server must bind to 127.0.0.1 by default and only expose to other hosts via an explicit flag, since it serves unbuilt drafts.", "anchors": ["src/serve/server.rs", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f13", "text": "The file watcher must ignore the output directory; if it is watched, each rebuild triggers another rebuild.", "anchors": ["src/serve/watcher.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f05", "text": "Markdown-to-HTML conversion is done in src/content/markdown.rs using pulldown-cmark; extension options (tables, footnotes, strikethrough) are enabled in one Options value there.", "anchors": ["src/content/markdown.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "fine by me", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f28", "text": "Template paths in the base theme are resolved relative to the site's templates directory, so a fixture site needs its own templates/base.html to render.", "anchors": ["tests/fixtures/basic_site/templates/base.html", "src/render/templates.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f33", "text": "The README is the user-facing quick start and should reflect CLI flag changes made in src/cli.rs.", "anchors": ["README.md", "src/cli.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f32", "text": "Pages with draft = true in front matter are excluded from production builds but included by the dev server, so check the flag in both the build and serve paths.", "anchors": ["src/content/frontmatter.rs", "src/serve/server.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f04", "text": "Front matter parsing fails on a missing closing +++ delimiter, and the error should include the file path or users cannot tell which page is broken.", "anchors": ["src/content/frontmatter.rs", "tests/frontmatter_test.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f09", "text": "Incremental builds use content hashes rather than mtimes, because git checkouts and CI caches reset modification times and caused spurious rebuilds.", "anchors": ["src/build/incremental.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f19", "text": "To add a regression case for a rendering bug, add a Markdown file under tests/fixtures/basic_site/content and assert on the generated HTML in the integration test.", "anchors": ["tests/fixtures/basic_site/content/index.md", "tests/build_integration.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f20", "text": "Front matter unit tests live in tests/frontmatter_test.rs separate from the build integration tests.", "anchors": ["tests/frontmatter_test.rs"], "label": 0, "source": "random"}]} {"project_id": "p0196", "query": "that works", "query_type": "vague", "positives": [], "candidates": [{"fact_id": "p0196-f30", "text": "Config paths such as content_dir and output_dir are resolved relative to the inkwell.toml location, not the current working directory, so running from a subdirectory still works.", "anchors": ["src/config.rs", "tests/fixtures/basic_site/inkwell.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f27", "text": "Bumping the version in Cargo.toml must match the release tag, or the release workflow will publish artifacts with an inconsistent version.", "anchors": ["Cargo.toml", "github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f22", "text": "The workflow files and ignore file are listed without a leading dot in the tree (github/, gitignore) but are real dotfiles at repo root as .github/workflows and .gitignore.", "anchors": ["github/workflows/ci.yml", "gitignore"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f23", "text": "CI runs cargo fmt --check and clippy with warnings denied, so formatting must follow rustfmt.toml before pushing.", "anchors": ["github/workflows/ci.yml", "rustfmt.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f25", "text": "Release builds are produced by a separate workflow triggered by version tags, building per-platform binaries and attaching them to the GitHub release.", "anchors": ["github/workflows/release.yml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f10", "text": "Changing a template or inkwell.toml must invalidate the whole incremental cache, since every page depends on them; only editing a single Markdown file may rebuild just that page.", "anchors": ["src/build/incremental.rs", "src/config.rs"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f26", "text": "Cargo.lock is committed because inkwell-ssg is a binary crate; keep it updated when changing dependencies so CI builds with --locked pass.", "anchors": ["Cargo.lock", "Cargo.toml"], "label": 0, "source": "hard"}, {"fact_id": "p0196-f17", "text": "The live-reload script is injected into HTML responses only by the dev server; it must never be written by the writer into production output.", "anchors": ["src/serve/server.rs", "src/build/writer.rs"], "label": 0, "source": "random"}, {"fact_id": "p0196-f24", "text": "Format code locally with `cargo fmt` before committing; rustfmt.toml holds the project's style settings.", "anchors": ["rustfmt.toml"], "label": 0, "source": "random"}, {"fact_id": "p0196-f08", "text": "Tera autoescapes only templates with .html/.htm/.xml extensions, so rendered Markdown HTML must be output with the | safe filter or it shows up escaped.", "anchors": ["src/render/templates.rs", "tests/fixtures/basic_site/templates/base.html"], "label": 0, "source": "random"}]}