Feedback & Bug Reporting

April 3, 2026 ยท View on GitHub

Standards for detecting, reporting, and fixing issues in hidrix-tools โ€” for both agents and humans.

When to report

A tool needs a bug report when any of these happen:

SignalExampleSeverity
Empty resultsfacebook_scraper returns 0 posts for a known-active group๐Ÿ”ด High
Wrong dataReactions count is 0 but post clearly has engagement๐ŸŸ  Medium
TimeoutActor runs > 5 minutes with no result๐ŸŸ  Medium
CrashError: Cannot read property 'map' of undefined๐Ÿ”ด High
Auth error401 Unauthorized or 403 Forbidden from provider๐ŸŸก Low (config issue)
Stale dataPosts returned are months old when since was set๐ŸŸ  Medium
Format brokenMarkdown output is garbled or missing fields๐ŸŸก Low
Provider changedApify actor deprecated or API response schema changed๐Ÿ”ด High

How to report

For agents (automated)

When a tool returns an error or unexpected result, create a structured report:

## Bug Report: [tool_name]

**Tool**: facebook_scraper
**Mode**: group
**Input**: `{ source_type: "group", targets: "https://facebook.com/groups/xxx", max_posts: 50 }`
**Expected**: 50 posts with engagement data
**Actual**: 0 posts returned, no error message
**Provider**: Apify crowdpull/facebook-group-posts-scraper
**Timestamp**: 2026-04-03T09:30:00Z

### Debug info
- Apify run ID: yTSKs7TRFBGSfeims
- Apify run status: SUCCEEDED
- Dataset items: 0
- Possible cause: Actor free tier limitation or group is private

### Suggested fix
Try alternative actor `scraper-engine/facebook-group-posts-and-details-scraper`
or switch to `thescrapelab/apify-facebook-post-scraper` with cookie auth.

For humans

Open an issue on the repo or add to docs/known-issues.md with:

  1. What you did (input)
  2. What happened (actual output)
  3. What you expected
  4. Any error messages or logs

Where to report

MethodWhen
GitHub IssueBug in tool code, new feature request
docs/known-issues.mdKnown limitations, provider quirks
Inline // TODO:Quick fix needed in code
PR with fixYou already know the solution

Feedback loop mechanism

1. Tool-level health check

Every tool should validate its output before returning:

// In tool execute():
if (posts.length === 0) {
  return [
    `โš ๏ธ No results found.`,
    ``,
    `**Possible causes:**`,
    `- Group/page is private (not public)`,
    `- Provider API changed or rate-limited`,
    `- API token expired or invalid`,
    ``,
    `**Debug:** source_type=${sourceType}, targets=${targets}`,
    `**Provider:** ${actorId}`,
    ``,
    `Report this if the target is definitely public and active.`,
  ].join("\n");
}

2. Provider health status

The lib/apify.ts client tracks run status. If a run fails:

  • Log the Apify run ID for debugging
  • Include status message in error output
  • Suggest checking Apify console: https://console.apify.com/organization/runs/{runId}

3. Regression detection

When updating a tool or provider:

# Run the smoke test
bun test:smoke

# Manual check: does this still return data?
bun -e 'import { definition } from "./tools/facebook-scraper/index.ts"; 
const r = await definition.execute({ source_type: "page", targets: "100064860875397", max_posts: 3, sort: "relevant", countries: "US", ad_status: "active" }); 
console.log(r.includes("posts") ? "โœ… PASS" : "โŒ FAIL: empty result");'

4. Provider fallback chain (future)

When a provider fails, try the next one automatically:

Apify crowdpull โ†’ Apify scraper-engine โ†’ Apify thescrapelab โ†’ error with instructions

This is tracked in the provider-registry design but not yet implemented.

Known provider quirks

ProviderQuirkWorkaround
Apify crowdpull/facebook-group-posts-scraperReturns 0 posts on free tier for some groupsTry paid tier or different actor
Apify data-slayer/facebook-page-postsTakes pageId (numeric), not URLExtract ID from URL before calling
Meta Ad Library APIRate limit 200 calls/hourBatch queries, cache results
Meta Ad Library APIOnly political ads have spend/impressions dataCommercial ads have creative only

Severity levels

  • ๐Ÿ”ด High: Tool completely broken, no workaround
  • ๐ŸŸ  Medium: Tool works but returns wrong/incomplete data
  • ๐ŸŸก Low: Cosmetic, config issue, or has easy workaround

Checklist for fixing a bug

  • Reproduce the bug with the exact input from the report
  • Identify root cause (code bug vs provider change vs config)
  • Fix and test locally
  • Update docs/known-issues.md if it's a provider limitation
  • Add inline comment explaining the fix
  • Commit with message: fix(tool_name): description of fix