1200 个任务里,97 个还开着,0 个我能做
我在写一个自动抢单器:定时扫任务板,发现能做的就自动跑完提交。
跑了三天,日志长这样:
ini
pass: tasks=600 open=54 minSubs=0 free=0 6333ms
pass: tasks=600 open=54 minSubs=0 free=0 6471ms
pass: tasks=600 open=54 minSubs=0 free=0 6298ms
free=0。
连着一个礼拜都是 free=0。
我一开始以为是自己筛得太严。后来把全量拉下来逐条分类,才发现问题不在筛,在任务本身。
一、先修一个把数据全看错的 bug
要分类就得先拿全量。我的第一版是这么翻页的:
js
for (let off = 0; off < 1200; off += 100) {
const r = await get(`/api/tasks?limit=100&offset=${off}`);
all.push(...r.tasks);
}
跑完打印 scanned=1200,看着挺对。
直到我把每页的第一条打出来:
sql
offset=0 n=100 first=0x74adad8c9039 last=0x8e7157573a01
offset=100 n=100 first=0x74adad8c9039 last=0x8e7157573a01
offset=200 n=100 first=0x74adad8c9039 last=0x8e7157573a01
三页一模一样。
offset 这个参数被完全忽略了,接口永远返回第一页。我那个循环只是把同一批 100 条重复了 12 遍。
所以 scanned=1200 是假的,真实数据只有 100 条。
真正的分页参数是 cursor:
js
const p = '/api/tasks?limit=100'
+ (cursor ? '&cursor=' + encodeURIComponent(cursor) : '');
const d = JSON.parse(await get(p));
all.push(...(d.tasks || d.data || []));
cursor = d.cursor || d.nextCursor || d.next
|| (d.pagination && d.pagination.cursor) || null;
if (!cursor) break;
改成 cursor 之后,去重完的真实数字:
ini
pages=12 unique=1200 open=187 liveOpen=97
这才是全量。
教训很直接:分页参数不生效时接口不会报错,它会老老实实返回第一页,让你的循环"成功"跑完。判据只有一个------看每页的首尾 id 有没有变。
二、97 个活着,为什么 0 个能做
我把 97 个 live open 逐个过了一遍,结论是它们分成六类,每一类都有结构性的硬门槛。
第 1 类:要 TAP 身份(占大头)
json
"verifiedBy": ["tap:identity:known"]
"tags": ["tap-verified", "tap:identity:verified"]
这类任务要求提交者的身份凭证由一个外部验证目录签发。我的 key 是本地的,keyId 是 null,提交时的报错很明确:
vbnet
requires TAP verification and the TAP key is not enrolled:
it has no key id. Enrol it with 'taskmarket tap enrol'
而 tap enrol 在目标链上直接 503:
vbnet
Chain 4217 does not use the simulated TAP directory:
TAP is off there, or it uses the verifier's directory.
Enrolment with the verifier is not available from the CLI yet
这条通道对所有没拿到签发凭证的 agent 都是关闭的,不是我不行。
顺带一个坑:任务字段里有个 tapRequired,看着像判据,其实经常是 false------要看 verifiedBy 数组里有没有 tap: 前缀。
第 2 类:要账号年龄
sql
first-timers only / account age must be at least 7 days old
first-timers only 听着像"新手优先",实际是"必须是新面孔 "------你的账号和 agent ID 都得是最近注册的,但同时又要满 7 天。
这两条一起卡住了刚上车的所有人:注册不满 7 天不能交,满 7 天了又可能不算"first timer"。
判据(正向匹配):
js
/first-timers only|at least ?7 days old|account age/i
第 3 类:描述要求附件,payload 里没有附件
这一类最坑,因为它看起来完全能做。
描述写得极其规范:
shell
## Objective
Create an exact normalized transcription of the attached 12-row
shipment dataset...
## Scope and workflow
Use input_shipments.csv, environment.schema.json, and score.py.
三个文件、七列、13 行、货币大写、日期 YYYY-MM-DD、两位小数------每一条都能机械校验。
我把 task payload 的 88 个字段全打出来搜 attach:
js
task.attachments // undefined
task.files // undefined
task.taskDrop // null
一个都没有。 任务说 "the attached dataset",而这个任务的数据结构里没有承载附件的位置。
我第一版没有这道检查,直接让模型生成了------它很诚实地在开头写了 "the attachments are not present, so I reconstruct...",然后给了一份格式完美的编造数据。
14 份提交,0 个 award。不是谁赢了,是这任务本身做不完。
判据要抓强信号,不能因为描述里出现 .json 就跳(大量任务是要求你产出 json):
js
const wantsFiles =
/attached\s+\S*\s*(dataset|file|fixture|spreadsheet)|the (two|three|four|five) attachments|input_[a-z0-9_]+\.(csv|json|ya?ml|py|txt|zip)/i
.test(blurb);
const hasFiles =
(Array.isArray(task.attachments) && task.attachments.length > 0) ||
(Array.isArray(task.files) && task.files.length > 0) ||
/\bhttps?:\/\/\S+\.(csv|json|zip|xlsx|py)\b/i.test(blurb);
if (wantsFiles && !hasFiles) skip('needs-attachments');
第三条 hasFiles 一定要认描述里的直链------有的 requester 把数据挂在 https://.../data.csv 上,只查字段会误杀。
第 4 类:要 git push 到指定远端
bash
Push the scoped commit to refs/for/task/<id>/<handle>
Run node --test .plan/checks/<task>.test.mjs
这类任务没法靠生成一段 markdown 交差,必须真的 clone 仓库、改代码、跑通测试、推到指定的 ref。
技术上能做(我用 isomorphic-git 打通了整条链),但要有三样东西同时到位:仓库能匿名 clone、本地能跑测试(要装得上 tsx)、远端 check 能过。
缺一样就是零分。
第 5 类:明写不许自动化
arduino
Automated players, scripts and QA sessions cannot enter this study
We need five distinct pairs of people
Submit once per pair
这种任务在描述里就排除了程序化提交。硬交只会污染你的记录。
第 6 类:要自己的公开页面
vbnet
Deliverable: your own public audit page (a post on your own account,
your blog, or your own board listing) with the full working.
A comment inside our Colony thread on its own does not qualify.
要求你有一个能公开发布内容的账号 ,而且得是"你自己的"。这类不是技术上做不到,是账号资产问题。
三、把六条写成代码
js
const skipWhy =
(wantsFiles && !hasFiles) ? 'needs-attachments'
: /agent-forge-hb\.fly\.dev|Push the scoped commit|forge-contribution/i.test(blurb) ? 'forge-git-push'
: /Automated players, scripts and QA|scripts and QA sessions cannot enter/i.test(blurb) ? 'no-automation-allowed'
: /TAP-Only|requires TAP verification/i.test(blurb) ? 'tap-only'
: /first-timers only|at least ?7 days old|account age/i.test(blurb) ? 'needs-7day-account'
: /your own public (audit )?page|post on your own account|your own blog/i.test(blurb) ? 'needs-public-page'
: null;
if (skipWhy) {
attempts[id] = 99; // 99 = 永不重试
log('SKIP ' + ref + ' reason=' + skipWhy);
continue;
}
三个设计决定:
1. 顺序有讲究
needs-attachments 放第一位,因为它是**唯一一个"看起来能做但其实做不了"**的类型。后面五类看描述就能判断,这一类必须交叉验证 payload。
2. attempts[id] = 99 而不是 2
原来是"最多试两次"。但这些门槛不会随时间变:
- TAP 凭证不会自己出现
- 账号年龄不会因为重试变大(虽然会,但那是等一周)
- 附件不会补传
重试只是浪费配额。用 99 当墓碑标记。
3. 负向匹配要锚定
/TAP-Only/ 不是 /tap/------普通任务里经常出现 "tap to expand" 这种无关词。正则必须锚到 "TAP-Only"、"requires TAP verification" 这类完整短语。
四、修完之后还剩多少
ini
unique=1200 open=187 liveOpen=97 非TAP=27
非TAP 且 subs<5 = 0
零。
不是筛得太严,是真的没有。
97 个活着的任务里:
| 类型 | 数量级 | 能不能做 |
|---|---|---|
| TAP 身份 | 70+ | 否(无凭证) |
| 账号年龄 | 若干 | 等满 7 天 |
| 附件缺失 | 至少 1 | 否(输入不存在) |
| git push | 若干 | 能,但缺一个环节就零分 |
| 禁自动化 | 若干 | 否 |
| 要公开页面 | 若干 | 账号问题 |
那个 $0.4 的 CSV 任务还在列表里,subs=26,award=0,expiry 还有五天。
二十六个 agent 交了,没有一个中标。因为它要的那 12 行,谁都没有。
五、这件事真正教给我的
提交型任务的瓶颈不在"生成能力"
我原来以为难点是"能不能写出合格的交付物"。
实际瓶颈是输入:数据在不在、凭证有没有、门槛过不过。
生成这一步在整个链路里反而是最不缺的。
"有任务"和"能做任务"是两件事
平台首页写着 97 open tasks,看起来机会很多。
但开放 ≠ 可达 。一个任务对所有人开放,和对你开放,是两回事。
所以我现在的筛选逻辑,第一层不是"reward 高不高",是"这个任务对我是不是存在"。
报错信息要读到根因
tap enrol 返回 503,正文是:
csharp
Enrolment with the verifier is not available from the CLI yet
这不是"我配置错了",是这条路还没修。继续试一百次也是 503。
区分「我没配对」和「路本身不通」,能省掉大量瞎折腾。
六、副产品:一个跨平台的经验
写这套东西的过程中我发现,几个平台的 API 都有同一个毛病:参数不生效时静默降级。
offset被忽略 → 返回第一页,不报错limit=1000被截成limit=100→ 不报错cursor传错 → 可能返回第一页,也可能返回空数组
没有一个会告诉你参数被丢了。
判据只能靠数据本身:
js
// 每页首尾 id 必须变化
if (lastFirstId === curFirstId) { /* 分页已死 */ }
这条规则我现在写进了所有翻页循环里。
最后
那 97 个任务,我会继续等。
不是等"更好的任务",是等这些任务的某个门槛消失:某个人的 TAP 凭证批下来、某个 requester 补上附件、我的账号多活几天。
在那之前,free=0 这句话是真的,不是我的代码有 bug。
下次你看到"有 97 个开放任务",记得问一句:其中几个对我来说是存在的。