Skip to content

Commit 87b7c92

Browse files
janbucharMQ37
andauthored
fix: Use readmeSummary instead of full readme to avoid context bloat (#454)
* fix: Use readmeSummary instead of full readme to avoid context bloat * Do not conflate readmeSummary and readme when fetching * Fill in the readmeSummary in tool outputs * Do not return full readme from actor detail tool * Use stable apify-client * Fix forgotten readme option * Update integration test * Prefer readmeSummary with full readme fallback, remove duplicate readme from widget payload - Add resolveReadmeContent() helper: prefers readmeSummary, falls back to full readme - Normal mode: uses summary-or-fallback for both text and structuredContent - OpenAI widget mode: always uses full readme via original processActorDetailsForResponse - Remove duplicate top-level readme from widget structuredContent (widget reads actorDetails.readme) - Rename user-facing output option from readmeSummary to readme - Remove readmeSummary from search tool outputs and StructuredActorCard - Add readmeSummary to ActorDefinitionPruned for data pass-through - Add integration test helpers and README content tests - Fix typo in fetch-actor-details-internal description --------- Co-authored-by: MQ37 <themq37@gmail.com>
1 parent b25d639 commit 87b7c92

10 files changed

Lines changed: 389 additions & 40 deletions

File tree

AGENTS.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,16 @@ After completing ANY code change (feature, fix, refactor), you MUST:
6060
- Fix ALL TypeScript errors before proceeding
6161
- Zero tolerance for type errors
6262

63-
2. **Build**: `npm run build`
64-
- Ensures compilation succeeds
65-
- Fix all compilation errors before running tests
66-
67-
3. **Lint**: `npm run lint`
63+
2. **Lint**: `npm run lint`
6864
- Fix ALL lint errors before proceeding
6965
- Use `npm run lint:fix` for auto-fixable issues
7066

71-
4. **Unit tests**: `npm run test:unit`
67+
3. **Unit tests**: `npm run test:unit`
7268
- ALL tests must pass
7369
- If a test fails, fix it before moving on
7470

71+
**⚠️ IMPORTANT: Do NOT use `npm run build` for routine code verification.** Always use `npm run type-check` instead — it is faster and sufficient for validating TypeScript correctness. Only run `npm run build` when you explicitly need compiled JavaScript output (e.g., before integration tests or deployment).
72+
7573
**When to run verification:**
7674
- After implementing a feature
7775
- After fixing a bug
@@ -106,7 +104,7 @@ After completing ANY code change (feature, fix, refactor), you MUST:
106104
### Important: Integration tests require APIFY_TOKEN
107105

108106
**⚠️ DO NOT attempt to run integration tests as an agent.** Integration tests require a valid `APIFY_TOKEN` environment variable, which only humans have access to. As an agent, you should:
109-
- Run `npm run type-check` and `npm run build` to validate TypeScript changes
107+
- Run `npm run type-check` to validate TypeScript changes (do NOT use `npm run build` for this)
110108
- Run `npm run test:unit` for unit tests which don't require authentication
111109
- Skip integration tests - these must be run by humans with valid Apify credentials
112110

0 commit comments

Comments
 (0)