feat(playwright): adopt per-thread sessions for shared Chrome automation
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# AGENTS.md
|
||||
|
||||
## XiaoHongShu / Playwright Hard Rules
|
||||
|
||||
These rules are mandatory for any workflow that uses `tools/pw` (directly or indirectly).
|
||||
|
||||
1. Preflight before first browser action:
|
||||
- Run `tools/pw --help` once with escalation (`sandbox_permissions=require_escalated`).
|
||||
2. All `tools/pw ...` commands (including browse/like/comment/reply flows) must be executed with escalation (`sandbox_permissions=require_escalated`) by default.
|
||||
3. If preflight or any `tools/pw ...` command still fails with network sandbox signatures, rerun the same command with escalation immediately:
|
||||
- `ENOTFOUND`
|
||||
- `EAI_AGAIN`
|
||||
- `ETIMEDOUT`
|
||||
- `ECONNREFUSED`
|
||||
- `registry.npmjs.org` fetch failure
|
||||
4. Do not continue XiaoHongShu actions (browse/like/comment/reply) until preflight succeeds.
|
||||
5. Do not try alternate non-escalated workarounds for `tools/pw`.
|
||||
Reference in New Issue
Block a user