Skip to content

feat(config): ingest maintainer focus manifests for repo-specific guidance - #74

Closed
Khaostica wants to merge 3 commits into
JSONbored:mainfrom
Khaostica:claude/wizardly-stonebraker-5cf69e
Closed

feat(config): ingest maintainer focus manifests for repo-specific guidance#74
Khaostica wants to merge 3 commits into
JSONbored:mainfrom
Khaostica:claude/wizardly-stonebraker-5cf69e

Conversation

@Khaostica

Copy link
Copy Markdown
Contributor

Summary

  • Closes feat(config): ingest maintainer focus manifests for repo-specific guidance #34. Adds a deterministic maintainer focus manifest ingestion path so repo owners can declare wanted/blocked paths, preferred labels, linked-issue policy, test expectations, issue-discovery policy, and maintainer notes (from a repo file or an API-backed record).
  • New src/signals/focus-manifest.ts tolerantly parses/normalizes the manifest. Missing or malformed config degrades to safe deterministic defaults with warnings instead of crashes, and never throws.
  • Feeds the manifest into local branch analysis: maintainer-blocked paths become branch-quality blockers, wanted paths and preferred labels surface as findings, the linked-issue/test/issue-discovery policies emit findings, and a public-safe "Maintainer Focus" section is added to the PR packet.
  • Public/private boundary: maintainer-private notes are kept out of all public next steps, and every public line passes the forbidden-language redaction guard (no reward/wallet/hotkey/payout/ranking/trust-score/path leakage).
  • Accepts focusManifest on the /v1/local/branch-analysis API and the MCP local-branch tool, and exposes manifestGuidance in the OpenAPI response schema.

Validation

  • npm run test:ci

Verified locally: git diff --check, typecheck, build:mcp, test:workers, and npm audit all pass; new focus-manifest, local-branch, OpenAPI, and API/route suites pass; src/signals/focus-manifest.ts is at 100% line / 99% branch coverage. Full test:ci (incl. test:mcp-pack, parallel coverage, docs build) runs green in CI on push.

  • Changelog updated only if this is a release-prep change (not a release — changelog intentionally untouched)

New/updated tests cover the required scenarios: valid config, missing config, malformed config, blocked-path preflight, preferred-path recommendation, and a public-sanitizer regression (including a fast-check property test asserting public next steps never contain forbidden language for arbitrary manifests).

Safety

  • Backend-only change
  • No secrets, wallet details, user PATs, raw trust scores, or private rankings exposed
  • Public text avoids compensation-seeking or optimization-tactic language
  • OpenAPI/MCP behavior updated where needed
  • Public docs/changelogs updated where needed (n/a — no public docs affected)

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Khaostica the parser/guidance layer is good, but this does not yet satisfy the issue.

Required:

  • Resolve the conflict in src/api/routes.ts.
  • Actually ingest repo-owned config (.gittensory.yml/JSON or persisted repo settings), not only caller-supplied focusManifest in local branch input.
  • Feed the manifest into decision packs and agent planning, not only local branch analysis.
  • Keep maintainer-private notes out of public packets and add regression coverage for that boundary.

@Khaostica
Khaostica force-pushed the claude/wizardly-stonebraker-5cf69e branch from 97bf45b to 84cc50c Compare May 30, 2026 19:25
@dosubot dosubot Bot added size:XL and removed size:L labels May 30, 2026
@Khaostica
Khaostica requested a review from JSONbored May 30, 2026 19:25

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Khaostica This remains blocked by merge conflicts and typecheck failures.

A few notes:

  • The maintainer focus manifest direction makes sense: repo-specific guidance can help keep public/private behavior, review expectations, and decision-pack recommendations aligned with maintainer intent.
  • The current branch conflicts with src/api/routes.ts, src/mcp/server.ts, and src/services/agent-orchestrator.ts.
  • CI fails at typecheck because test/unit/focus-manifest.test.ts imports fast-check, but fast-check is not installed, and the property test callback parameters are implicitly any.

Required changes:

  • Rebase onto current main and resolve the API/MCP/orchestrator conflicts.
  • Either add fast-check intentionally with package and lockfile updates, or rewrite the property-style test using the existing Vitest test stack.
  • Fix the implicit any parameters in test/unit/focus-manifest.test.ts.

Expected validation:

  • npm run typecheck
  • npm run test:coverage

Khaostica added 3 commits June 1, 2026 10:09
…dance

Add a deterministic focus-manifest parser that normalizes a repo-owned
manifest (repo file or API-backed record) into wanted/blocked paths,
preferred labels, linked-issue policy, test expectations, issue-discovery
policy, and maintainer notes. Missing or malformed config degrades to safe
defaults with warnings instead of throwing.

Feed the manifest into local-branch analysis so guidance can explain why a
path is preferred or discouraged: blocked paths become branch-quality
blockers, wanted paths and preferred labels surface as findings, and a
public-safe "Maintainer Focus" packet section is added. Maintainer-private
notes never reach public next steps, and all public text passes the
forbidden-language redaction guard.

Accept focusManifest on the local branch-analysis API and MCP tool inputs and
expose manifestGuidance in the OpenAPI response schema.

Closes JSONbored#34.
…d agent

Add a repo-owned focus manifest loader (`.gittensory.json` or
`.github/gittensory.json`, plus a persisted "api_record" path via
upsertRepoFocusManifest) on top of the signal_snapshots table; missing,
malformed, or network-erroring sources degrade to a safe empty manifest
with warnings instead of throwing.

Wire the loader through every consumer:

- /v1/local/branch-analysis and the MCP localBranch tool fall back to the
  repo-owned manifest when no caller-supplied focusManifest is present.
- The agent orchestrator's analyzeLocalBranch path does the same so
  base-agent runs reuse maintainer-declared guidance.
- buildAndPersistContributorDecisionPack bulk-loads per-repo manifests
  and attaches a public-safe RepoDecisionManifestSummary plus
  manifest-driven whyThisHelps / nextActions / publicNextActions /
  riskReasons to each RepoDecision.

Privacy boundary: RepoDecisionManifestSummary intentionally excludes
maintainerNotes, and publicNextActions are run through the existing
forbidden-language guard. New regression tests in decision-pack.test.ts
JSON-stringify a manifested RepoDecision and assert "ping @owner" /
"Internal:" never appear, alongside loader tests that stub the public
GitHub fetcher to cover the file-fetch, error, and api-record paths.
Add tests for the previously-uncovered branches flagged by CI: the
preferred linked-issue and encouraged issue-discovery manifest arms in
buildRepoDecisionManifestReasons, the loader's refresh bypass and
missing/unparseable snapshot-timestamp staleness paths, and the
string-list de-duplication branch in the manifest normalizer.
@Khaostica
Khaostica force-pushed the claude/wizardly-stonebraker-5cf69e branch from 8747813 to 90108bc Compare June 1, 2026 14:10
@Khaostica Khaostica closed this Jun 1, 2026
@Khaostica
Khaostica deleted the claude/wizardly-stonebraker-5cf69e branch June 1, 2026 14:11
@Khaostica

Copy link
Copy Markdown
Contributor Author

Heads up: this PR was auto-closed when I renamed the head branch off the claude/* convention (GitHub closes cross-fork PRs on a head-branch rename). The revised work continues in #191 — rebased onto current main with the src/api/routes.ts, src/mcp/server.ts, and src/services/agent-orchestrator.ts conflicts resolved, the fast-check dependency removed in favor of a deterministic Vitest property-style test, and the implicit-any callback params fixed. npm run typecheck and npm run test:coverage pass.

@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(config): ingest maintainer focus manifests for repo-specific guidance

2 participants