Skip to content

feat(config): add Gittensory repo focus manifest#389

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/issue-118-gittensory-focus-manifest
Jun 10, 2026
Merged

feat(config): add Gittensory repo focus manifest#389
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/issue-118-gittensory-focus-manifest

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #118

Summary

  • Adds a machine-readable Gittensory repo focus manifest at .gittensory.yml (wanted backend/MCP paths, blocked website/lovable areas, test expectations, public vs private notes).
  • Extends focus-manifest parsing to support YAML (.gittensory.yml first, then JSON candidates) with safe malformed-manifest warnings.
  • Bundles a self-repo fallback (src/config/gittensory-repo-focus-manifest.ts) so decision packs, preflight, and maintainer APIs work before the file is on main.
  • Exposes maintainer-only GET / PUT /v1/repos/{owner}/{repo}/focus-manifest returning manifest + compiled policy.

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

New / updated tests: test/unit/gittensory-focus-manifest.test.ts, test/unit/focus-manifest.test.ts, test/unit/focus-manifest-loader.test.ts.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include screenshots or a short recording.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • Parent roadmap: roadmap: beta-grade Gittensory base agent v2 #82.
  • Self-dogfood uses GITTENSORY_DRIFT_ISSUE_REPO when set; otherwise JSONbored/gittensory.
  • GITTENSORY_REPO_FOCUS_MANIFEST_YAML must stay in sync with .gittensory.yml (enforced by unit test).

@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.

@kiannidev the manifest/parser/API shape is useful, but I cannot merge this policy as written.

A few notes:

  • The main blocker is .gittensory.yml treating apps/gittensory-ui/ as a blocked path.
  • That would classify legitimate focused control-panel work as blocked, which conflicts with how this repo currently accepts UI work tied to operator analytics, safety, and release workflows.
  • The API/OpenAPI direction is fine, but the policy semantics need to match the repo.

Required changes:

  • Rework the focus manifest so UI work is discouraged/conditional where appropriate, not categorically blocked.
  • Update tests to cover allowed focused UI changes and genuinely blocked surfaces separately.
  • Keep the manifest language aligned with CONTRIBUTING instead of creating a stricter hidden policy.

Validation expected:

  • Rerun the focused manifest/parser/API tests and any OpenAPI check touched by this PR.

@ghost

ghost commented Jun 5, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #389 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@dosubot dosubot Bot removed the size:L label Jun 5, 2026
@ghost ghost added the gittensory:reviewed label Jun 5, 2026
@dosubot dosubot Bot added the size:XXL label Jun 5, 2026
@kiannidev
kiannidev force-pushed the feat/issue-118-gittensory-focus-manifest branch from 2c90386 to a094551 Compare June 5, 2026 13:57
@dosubot dosubot Bot added size:L and removed size:XXL labels Jun 5, 2026
@kiannidev
kiannidev force-pushed the feat/issue-118-gittensory-focus-manifest branch from a094551 to 6aa08d0 Compare June 5, 2026 13:58
@kiannidev

Copy link
Copy Markdown
Contributor Author

@JSONbored Thanks for the review — reworked the manifest policy and merged latest main.

Policy changes

  • Removed apps/gittensory-ui/ from blockedPaths; added it to wantedPaths so focused control-panel UI work (operator analytics, safety, release workflows) is in scope per CONTRIBUTING.
  • Kept genuinely blocked surfaces only: site/, CNAME, and **/lovable/**.
  • Updated publicNotes / maintainerNotes to discourage cosmetic UI-only polish without API wiring, not all UI work.

Tests

  • Focused UI paths (apps/gittensory-ui/src/routes/app.operator.tsx) → manifest_preferred_path.
  • Retired surfaces (site/, CNAME, lovable) → manifest_blocked_path.
  • Added test/unit/routes-focus-manifest.test.ts for GET/PUT route auth and persistence.

Merge

  • Resolved conflicts with main; kept focus-manifest routes and onboarding-pack preview.
  • npm run ui:openapi:check and npm run test:coverage pass locally (97% branch coverage).

Ready for another look.

@kiannidev
kiannidev requested a review from JSONbored June 5, 2026 14:02
@github-actions github-actions Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 6, 2026

@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.

@kiannidev some merge conflicts to fix before I can accurately review this, please.

@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.

Requesting changes. The branch is still unmergeable against current main, and there is also a concrete API behavior issue in the focus-manifest PUT handler. No merge or close action taken.

Comment thread src/api/routes.ts Outdated
@kiannidev
kiannidev requested a review from JSONbored June 7, 2026 08:41
kiannidev added a commit to kiannidev/gittensory that referenced this pull request Jun 7, 2026
…red#389

SignalSnapshotRecord.payload is typed as Record<string, JsonValue>; cast
the array fixture through unknown so the cache regression test still
exercises non-object persisted payloads without failing tsc.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ghost ghost mentioned this pull request Jun 8, 2026
24 tasks
@kiannidev
kiannidev force-pushed the feat/issue-118-gittensory-focus-manifest branch 2 times, most recently from 812cee0 to 2beda48 Compare June 8, 2026 23:23
@kiannidev

Copy link
Copy Markdown
Contributor Author

@JSONbored Thanks — rebased onto current main and resolved the conflicts on my side.

Rebase

  • Merged cleanly with current main, keeping focus-manifest routes alongside self-dogfood registration-pack and contributor-issue-draft endpoints from main.
  • Regenerated apps/gittensory-ui/public/openapi.json after the rebase.

Session access tests preserved

  • Same-repo owner GET/PUT
  • Cross-repo owner → 403 forbidden_repo
  • Operator session access to any repo
  • Static-token access + malformed JSON PUT → 400 invalid_json

Validation

  • git diff --check
  • Focus-manifest route / parser / loader tests
  • npm run ui:openapi:check
  • npm run validate (97.05% branch coverage)

Manifest policy semantics unchanged. Ready for another look.

@ghost ghost mentioned this pull request Jun 8, 2026
25 tasks
@kiannidev
kiannidev requested a review from JSONbored June 8, 2026 23:26
@kiannidev

Copy link
Copy Markdown
Contributor Author

HI, @JSONbored
Please review this PR..

Thanks

@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.

@kiannidev this is now in good shape.

A few notes:

  • The manifest policy no longer blocks legitimate focused UI work.
  • GET/PUT focus-manifest routes now apply repo-scoped session access.
  • The malformed JSON and OpenAPI/generated artifact concerns are addressed.
  • Local merge-tree against current main is clean.
  • No code changes requested.

Before I can merge this, please fix failing CI.

Add .gittensory.yml with wanted/blocked paths aligned to CONTRIBUTING,
YAML manifest parsing with bundled self-repo fallback, and maintainer
GET/PUT /v1/repos/{owner}/{repo}/focus-manifest routes with repo-scoped
session access, malformed JSON rejection, OpenAPI updates, and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev force-pushed the feat/issue-118-gittensory-focus-manifest branch from 3c17920 to 29a0221 Compare June 10, 2026 14:46
@kiannidev
kiannidev requested a review from JSONbored June 10, 2026 14:53
@kiannidev

Copy link
Copy Markdown
Contributor Author

HI, @JSONbored

I fixed the CI error and resolved conflicts..
Please review this PR..

Thanks

@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.

@kiannidev this is good to land.

A few notes:

  • The focus manifest now has the repo-scoped session guard on GET and PUT.
  • The self-repo fallback, YAML parsing, OpenAPI registration, and policy compilation are covered by focused tests.
  • The manifest keeps maintainer notes out of public guidance and keeps retired surfaces blocked.
  • Superagent is neutral, not a blocker here, and the non-Gittensory checks are green.

No code changes requested.

@JSONbored
JSONbored merged commit a656e2e into JSONbored:main Jun 10, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@github-actions github-actions Bot mentioned this pull request Jun 10, 2026
12 tasks
galuis116 added a commit to galuis116/gittensory that referenced this pull request Jun 10, 2026
After merging main, the self-repo (JSONbored/gittensory) now carries a bundled focus manifest (JSONbored#389), changing its generated draft, so the declined-draft generation test no longer matched its hardcoded policy fingerprint. Use a non-self repo (other-owner/other-repo) -- as the sibling duplicate-draft test does -- so the focus_policy_missing candidate is deterministic.
JSONbored added a commit that referenced this pull request Jun 11, 2026
* feat(issues): respect declined contributor-issue drafts

generateContributorIssueDrafts re-proposed (and in create mode re-created) drafts a maintainer had already closed, since dedup only considered open issues. Add a bounded closed-marked-issue lister and findDeclinedContributorDraft: a closed issue carrying a draft's stable marker suppresses re-proposal (skipped_declined) -- indefinitely for wontfix-style labels, otherwise within a 30-day cooldown so genuine regressions can resurface.

* test(issues): cover declined-draft cooldown fallback for the coverage gate

Mark the defensive declinedIssues [] fallback (unreachable via loadContributorIssueDraftContext) with v8 ignore, and add a findDeclinedContributorDraft case for a missing close timestamp, restoring branch coverage above the 97% gate.

* test(issues): use non-self repo for declined-draft generation test

After merging main, the self-repo (JSONbored/gittensory) now carries a bundled focus manifest (#389), changing its generated draft, so the declined-draft generation test no longer matched its hardcoded policy fingerprint. Use a non-self repo (other-owner/other-repo) -- as the sibling duplicate-draft test does -- so the focus_policy_missing candidate is deterministic.

---------

Co-authored-by: galuis116 <galuis116@users.noreply.github.com>
Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jun 18, 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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(config): add Gittensory repo focus manifest

2 participants