Skip to content

feat(miner-plan): soft-claim local-write action-spec builder #2315

Description

@JSONbored

A miner that wants to make its claim VISIBLE to a fleet (an optional, public "soft claim" — e.g. an eligibility comment on the issue saying "a miner is working on this") needs a spec BUILDER, not an actuator, exactly like the existing src/mcp/local-write-tools.ts pattern: gittensory supplies the CONTENT of a shell-safe command, the miner's OWN harness runs it with its OWN GitHub credentials. This module builds the spec only — it never executes anything, so it's contributor-safe under the same reasoning local-write-tools.ts already documents.

Reuse buildPostEligibilityCommentSpec directly rather than reinventing a new comment-poster — this issue's value-add is composing a deterministic, well-formatted soft-claim comment BODY (issue number, miner identifier, claimed-at timestamp, expiry note) and handing it to the existing builder.

Deliverables

  • packages/gittensory-engine/src/soft-claim.ts (or src/miner/soft-claim.ts) exporting buildSoftClaimCommentBody(input: { minerId: string; claimedAt: string; expiresAt?: string }) — pure string formatter
  • buildSoftClaimSpec(input) that composes the body above and calls the EXISTING buildPostEligibilityCommentSpec from src/mcp/local-write-tools.ts:54 — do not duplicate its command-construction/escaping logic
  • Deterministic, single-quote-shell-safe output (already guaranteed by the reused builder — verify with a test containing a single-quote in minerId)
  • Unit tests: with/without expiresAt, and the shell-injection-safety regression test
  • Docstring cross-referencing LOCAL_WRITE_BOUNDARY from local-write-tools.ts:8 so the boundary language stays consistent

References

  • src/mcp/local-write-tools.ts:54 (buildPostEligibilityCommentSpec — reuse, don't duplicate)
  • src/mcp/local-write-tools.ts:8 (LOCAL_WRITE_BOUNDARY constant + module header explaining the spec-builder-not-actuator boundary)
  • src/mcp/local-write-tools.ts:23 (the sq() shell-escaping helper already used by the reused builder)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions