Arkweb security patch merge

From openharmonyinsight/openharmony-skills · View interactive version

Arkweb security patch merge is an AI agent skill from the GitHub repository openharmonyinsight/openharmony-skills. Apply upstream Chromium patches into ArkWeb with deterministic patch normalization, batch planning, issue-scoped diff checks, and controlled manual merge fallback.

How to use this skill

Skill file

ArkWeb Patch Merge

用于 arkweb-security-patch-merge-engineer。

Core Flow

  1. Resolve the ArkWeb project root from context.codebase / context.automation.repoPath. context.projectRoot is the lightweight workflow output root.
  2. Resolve the input archive from context.requirements; keep it separate from the project root.
  3. Normalize every patch before scanning or applying it.
  4. In batch mode, generate the batch plan before applying any issue.
  5. Determine the target git subrepo before git apply.
  6. Try git apply --check, then git apply or git apply --3way as appropriate.
  7. If apply fails because of context drift or missing blobs, enter conflict resolution: perform minimal manual writing inside the issue's allowed files.
  8. Compute issue-scoped diff, validate 06_merge_result, and only then mark stage status.

Required Scripts

Prefer these scripts over hand-written ad hoc logic:

node skills/arkweb-security-patch-merge/scripts/normalize_patch.mjs <patch-file> --out <normalized-file>
node skills/arkweb-security-patch-merge/scripts/plan_batch.mjs --archive-dir <archive-run-dir> --project-root <context.codebase> --output-dir <context.projectRoot>/.ace-outputs/<runId>
node skills/arkweb-security-patch-merge/scripts/issue_diff_scope.mjs --repo <target-git-repo> --merge-result <issues/{issue_id}/06_merge_result.json>
node skills/arkweb-security-patch-merge/scripts/validate_merge_result.mjs <issues/{issue_id}/06_merge_result.json> --batch-status <batch_status.json> --issue-id <issue_id>

If a script reports invalid state, treat that as a blocker and fix the state/report before advancing.

References

Read only the relevant reference for the task:

Hard Rules

Outputs

Single issue:

Batch:

Each issue result must include:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.