Skip to content

Commit 729b37f

Browse files
committed
fix(firecrawl): count depth for scheme-less start URLs; doc prerequisites and CI wording
1 parent 84f9328 commit 729b37f

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎.github/CI.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `changes` job runs Turborepo 2.9.14's `affectedTasks` query before installin
44

55
A PR compares the checked-out GitHub merge commit with its first parent: the actual target revision tested by that merge. The PR event's base SHA can become stale when the target advances. Scoping requires a matching GitHub merge ref and SHA, exactly two merge parents, and a usable target parent; otherwise every check runs. This works with the existing depth-two checkout without fetching older ancestry. Main/staging pushes execute all checks; the parent `ci` workflow skips checks on `dev` pushes, while PRs targeting `dev` still run checks. A manual `checks` run executes all checks unless supplied a full base commit SHA to reproduce a scoped plan. Missing history, an empty diff, unknown files outside the workspace graph, root script/CI changes, or a planner error run every check. Missing selection outputs fail the aggregate gate. The gate also rejects an omitted dependency, any failed/cancelled job, and any skip that its explicit selection flag did not authorize.
66

7-
Dedicated docs verification uses the same planner, comparing pushes with their previous commit and PRs with the tested merge's first parent. Site acceptance follows `docs#build` and its transitive package dependencies. The app's docs-consumer task depends on server runtime and that docs build: backend-only changes run the platform consumer against the docs app, while site changes also run corpus and browser checks. Independent SDK and unit-only edits skip those production jobs. The required `docs HTTP` gate verifies explicit site/platform selections before accepting any skip.
7+
Dedicated docs verification uses the same planner, comparing pushes with their previous commit and PRs with the tested merge's first parent. Site acceptance follows `docs#build` and its transitive package dependencies. The app's docs-consumer task depends on server runtime and that docs build: backend-only changes run the platform consumer against the docs app, while site changes also run corpus and browser checks. Standalone package and unit-only edits skip those production jobs. The required `docs HTTP` gate verifies explicit site/platform selections before accepting any skip.
88

99
Docs production builds run once and publish an artifact to isolated HTTP, corpus, Chromium, and WebKit jobs. Source checks keep their own checkout because generator verification mutates inputs. Content caches use separate lint/source/build namespaces; generation validates every restore, repairs missing declarations, and removes obsolete modules. The Next build cache keeps its supported incremental behavior. Content and Next caches have size limits, and Next cache files expire after seven days; successful content eviction happens after all consumers finish.
1010

‎.github/CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ It provisions the database, generates secrets, writes `.env`, and offers the sou
152152

153153
#### Requirements
154154

155-
- Docker must be installed and running on your machine
155+
- [Bun](https://bun.sh/) for `bun run sim-setup` inside the clone, or Node.js 20+ for `npx sim-setup`
156+
- Docker with Docker Compose, installed and running
156157

157158
### Option 2: Using Docker Compose
158159

‎apps/sim/tools/firecrawl/crawl.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ describe('Firecrawl legacy crawl depth', () => {
8282
expect(accepts('/guides/auth/tokens/rotate')).toBe(false)
8383
})
8484

85+
it('measures depth from a scheme-less start URL the same way', () => {
86+
const body = crawlBody({ url: 'docs.example.com/guides/auth', maxDepth: 0 })
87+
const patterns = (body.includePaths as string[]).map((pattern) => new RegExp(pattern))
88+
expect(patterns.some((pattern) => pattern.test('/guides/auth'))).toBe(true)
89+
})
90+
8591
it('keeps a deep start URL when the caller also sets includePaths', () => {
8692
const body = crawlBody({
8793
url: 'https://example.com/docs/guides/auth/index.html',

‎apps/sim/tools/firecrawl/crawl.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ const INDEX_FILE_PATTERN = /^index\.(html|php)$/
2222
* start URL, and Firecrawl drops the start URL itself when it fails `includePaths`.
2323
*/
2424
function startPathDepth(url: string): number {
25+
const trimmed = url.trim()
2526
let pathname: string
2627
try {
27-
pathname = new URL(url).pathname
28+
// Firecrawl accepts a bare host like `docs.example.com/guides`, so parse it as https.
29+
pathname = new URL(/^[a-z][a-z\d+.-]*:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`)
30+
.pathname
2831
} catch {
2932
return 0
3033
}

0 commit comments

Comments
 (0)