Commits

8a002e530e83cd343af64755c4c2dffacc5e2d2c
Switch branches/tags
espadonne
All time
May 2026
Su Mo Tu We Th Fr Sa
26 27 28 29 30 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

Commits on May 11, 2026

  1. espadonne committed
  2. espadonne committed
  3. espadonne committed
  4. Merge pull request #97 from tenseleyFlow/contrib-live-diagnosis
    Credit affiliated imported commit authors
    espadonne committed
  5. Merge pull request #96 from tenseleyFlow/profile-contrib-parity
    Count profile contributions across repos
    espadonne committed
  6. espadonne committed

Commits on May 10, 2026

  1. espadonne committed
  2. espadonne committed
  3. Merge pull request #77 from tenseleyFlow/repo-source-remotes
    Add source remotes for submodule imports
    espadonne committed
  4. espadonne committed
  5. espadonne committed
  6. espadonne committed
  7. espadonne committed
  8. Merge pull request #59 from tenseleyFlow/offcanvas-remove-mcp
    Remove MCP registry from offcanvas nav
    espadonne committed
  9. espadonne committed
  10. espadonne committed
  11. storage: inject safe.directory=* in RepairSharedPerms git invocation
    Operator runs 'shithubd storage repair-shared-perms' as root over
    SSH; the bare repos are owned by shithub:shithub. git 2.35+'s
    dubious-ownership protection early-exits with the misleading
    'fatal: not in a git directory' before it reads core.sharedRepository.
    
    Same env trick the SSH dispatcher uses (cmd/shithubd/ssh_dispatch
    injects GIT_CONFIG_COUNT=1 + safe.directory=* for the cross-user
    git-receive-pack/upload-pack invocations). The path is verified
    contained-in-root above the env injection, so '*' here is safe by
    construction — every iteration of this loop targets a path we
    already validated.
    espadonne committed
  12. espadonne committed
  13. espadonne committed
  14. Merge remote-tracking branch 'origin/trunk' into sr2/audit-remediation-base
    # Conflicts:
    #	internal/web/handlers/orgs/orgs.go
    espadonne committed
  15. espadonne committed
  16. espadonne committed
  17. lint: lint-unused script + CI step to block shim regrowth (SR2 M1)
    scripts/lint-unused.sh fails the build when any non-test Go file
    under internal/ or cmd/ carries 'var _ = symbol' (the dead-code
    shim shape). Allows the legitimate 'var _ Type = (*X)(nil)'
    interface-assertion pattern by anchoring the regex to '= [A-Za-z]'
    without a type name in between.
    
    Wired into:
    - Makefile 'lint-unused' target + the 'ci' alias
    - .github/workflows/ci.yml as a dedicated step (the rest of the
      bash lints are still local-only; lint-unused gets first-class CI
      treatment because the audit caught regrowth twice in 3 days).
    espadonne committed
  18. drop var-_-equals-symbol unused-import shims (SR2 M1)
    Pre-fix: 8 sites carried 'var _ = symbol' shims with comments like
    'silence unused-import warnings during refactors'. These were lying:
    in every case the import was already used elsewhere in the file or
    the symbol was unreachable. Audit 2026-05-08 flagged 3 occurrences;
    audit 2026-05-10 found 8 — the pattern grew because nothing failed
    CI on it.
    
    Sites cleaned:
    - internal/auth/totp/recovery.go              (base32.StdEncoding)
    - internal/web/middleware/pat.go              (pgx.ErrNoRows)
    - internal/web/handlers/orgs/teams.go         (pgx.ErrNoRows + errors.New)
    - internal/web/handlers/profile/profile.go    (context.Background)
    - internal/web/handlers/api/api.go            (context.Background)
    - internal/web/handlers/repo/code.go          (pgtype.Int8{})
    - internal/web/handlers/repo/redirect.go      (usersdb.New)
    
    Build still passes after each shim drop because the imports are
    genuinely live; the shims were cargo-cult.
    espadonne committed
  19. storage: bare repos use --shared=group + add repair backfill (SR2 #287)
    Pre-fix: storage.RepoFS.InitBare ran 'git init --bare' without
    --shared=group, so objects/ wound up 0755 with no group-write.
    shithubd-web (runs as 'shithub' user) created repos; SSH-git
    dispatched git-receive-pack as the 'git' user (in the 'shithub'
    group). 'git' had read-execute on objects/ but not write, so push
    failed with 'unable to create temporary object directory'.
    git-upload-pack worked because read was sufficient.
    
    Fix at the source:
    - InitBare now runs 'git init --bare --shared=group --initial-branch=trunk'.
      Persists core.sharedRepository=group in config; produces 2775
      dirs (group write + setgid) and 0664 files. Parent dir gets 2750
      so the setgid propagates from byte zero.
    - CloneBareShared (fork path) prepends '-c core.sharedRepository=group'
      so the cloned repo carries the contract. NB: 'git clone --shared'
      alone is the alternates flag, NOT the perms flag — same word, two
      meanings.
    - RepairSharedPerms backfills existing repos: sets the config flag,
      walks the tree, chmods g+w on files and g+w+s on dirs. Idempotent.
    - 'shithubd storage repair-shared-perms' subcommand walks every
      <prefix>/<owner>/<name>.git under storage.repos_root and applies
      the repair. One-time use after deploying this binary on shithub-
      prod (the live droplet has 1 repo created pre-fix that needs it).
    
    Tests:
    - TestInitBare_SharedGroupContract: asserts core.sharedRepository
      config value + group-write bit on objects/.
    - TestRepairSharedPerms_FixesPreFixRepo: builds a deliberately
      pre-fix repo, calls Repair, asserts post-conditions match the
      contract InitBare produces from byte zero.
    
    Closes nothing yet — operator runs the new subcommand on the
    droplet after deploy. Audit script (deploy/audit/check-droplet-
    drift.sh) will pick up the binary swap and reflect drift if not.
    espadonne committed
  20. notifications: existence + visibility check on thread subscribe (SR2 H7+L4+L5+L7)
    H7: threadAction now loads the issue by id, asserts kind matches
    the URL kind (issue vs pr), then runs policy.IsVisibleTo on the
    parent repo before upserting notification_threads. Pre-fix any
    logged-in user could pollute the table with rows for private or
    non-existent issues.
    
    L4: dropped the raw `r.Header.Get("Referer")` redirect; route
    through notificationReturnPath which already validates the
    return_to form value via safeNotificationReturnPath.
    
    L5: kind check moved before VerifyUnsubscribe so unknown kinds
    fast-fail without a constant-time HMAC compare.
    
    L7: 5 silent `_ = h.d.Render.RenderPage(...)` callsites in
    orgs/orgs.go and orgs/teams.go now log on render error so a
    broken template surfaces instead of returning a blank 200.
    espadonne committed
  21. admin: split repoForceArchive into Archive/Unarchive (SR2 H8 + M2/M3/M6)
    H8: pre-fix repoForceArchive flipped is_archived as a toggle —
    clicking on an already-archived repo silently un-archived it with
    audit row ActionAdminRepoForceArchived (the name lied on the
    unarchive path). Now two routes:
    - POST /admin/repos/{id}/archive   → repoForceArchive (idempotent)
    - POST /admin/repos/{id}/unarchive → repoForceUnarchive
    Each emits its own audit action (ActionAdminRepoForceArchived /
    ActionAdminRepoForceUnarchived). repo_view.html branches on
    IsArchived to render the correct button.
    
    M2: inline raw SQL in admin handlers replaced with sqlc-generated
    queries:
    - admin/repos.repoForceArchive    → reposdb.ArchiveRepo
    - admin/repos.repoForceUnarchive  → reposdb.UnarchiveRepo (existed)
    - admin/repos.repoForceDelete     → reposdb.AdminForceDeleteRepo (new)
    - admin/users.userUnsuspend       → usersdb.UnsuspendUser (new)
    - orgs/teams.canSeeTeam           → orgsdb.IsTeamMember (new)
    - orgs/teams.filterSecretTeams    → orgsdb.IsTeamMember (same query)
    
    M3: drop the wasted ListTeamMembers call in canSeeTeam — the
    result was thrown into _ before the actual EXISTS check ran.
    
    M6 (partial): admin/repos.go switches http.Error → renderer for
    all error paths in the touched handlers.
    espadonne committed