Skip to content

Commit a93c0a8

Browse files
authored
Merge pull request #78 from Boring-Software-Inc/chore/remove-ascii-comments
chore: replace all ascii comments with plain
2 parents 899ec8e + be58d5d commit a93c0a8

11 files changed

Lines changed: 66 additions & 66 deletions

File tree

apps/web/autumn.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { feature, item, plan } from "atmn"
22

3-
// ─── Features ───────────────────────────────────────────────
3+
// Features
44

55
// Tracks AI spend in cents. With 1.25x markup on gpt-4o-mini:
66

@@ -19,7 +19,7 @@ export const custom_rules = feature({
1919
consumable: false,
2020
})
2121

22-
// ─── Plans ──────────────────────────────────────────────────
22+
// Plans
2323

2424
// Free: 100¢ = $1.00 of AI spend/month
2525

apps/web/src/integrations/trpc/routers/workflows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ export const workflowsRouter = {
717717
}
718718
}),
719719

720-
// ─── Admin endpoints (internal data collection) ────────────
720+
// Admin endpoints (internal data collection)
721721

722722
/** Scan an entire repo's contributors — admin only, no repo ownership check */
723723
adminScanRepo: adminProcedure

packages/core/src/contributor-score.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ export interface ScoreInput {
4242
allowedCount: number
4343
nearMissCount: number
4444

45-
// ─── Change 1: PR substance (split volume from quality) ─────
45+
// Change 1: PR substance (split volume from quality)
4646
/** Summary of merged PRs with quality weighting. Null = use flat mergedPrCount. */
4747
mergedPrSummary?: {
4848
total: number
4949
/** Each PR's multiplier summed based on target repo quality tier */
5050
qualityWeightedCount: number
5151
} | null
5252

53-
// ─── Change 2: Spray detection temporal data ────────────────
53+
// Change 2: Spray detection temporal data
5454
/** Temporal PR data for spray pattern detection. Null = skip spray checks. */
5555
prTemporalData?: {
5656
/** Intervals in seconds between consecutive PR creation timestamps */
@@ -65,7 +65,7 @@ export interface ScoreInput {
6565
reposInDensestWindow: number
6666
} | null
6767

68-
// ─── Change 3: Repo history with timestamps for decay ───────
68+
// Change 3: Repo history with timestamps for decay
6969
/** Timestamped events for time-decay scoring. Null = fall back to flat counts. */
7070
repoEvents?: Array<{
7171
type: "allowed" | "blocked" | "near-miss" | "cleared"
@@ -546,7 +546,7 @@ function scoreRedFlags(input: ScoreInput, sink: ScoreLineItem[]): number {
546546
)
547547
}
548548

549-
// ─── Spray detection (requires prTemporalData) ──────────────
549+
// Spray detection (requires prTemporalData)
550550
if (input.prTemporalData) {
551551
const td = input.prTemporalData
552552

packages/core/src/filter-pipeline.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { loadPrefsForInstallation } from "./pr-comment-loader"
4040

4141
const APP_BASE_URL = env.BETTER_AUTH_URL ?? ""
4242

43-
// ─── Scope helper ──────────────────────────────────────────────
43+
// Scope helper
4444

4545
type ScopeKey = "pullRequests" | "issues" | "comments"
4646

@@ -81,7 +81,7 @@ function ruleApplies(
8181
return scope[key]
8282
}
8383

84-
// ─── Types ─────────────────────────────────────────────────────
84+
// Types
8585

8686
export interface WebhookContext {
8787
installationId: number
@@ -189,7 +189,7 @@ function resolveOutcome(
189189
return "logged"
190190
}
191191

192-
// ─── Near-miss threshold ───────────────────────────────────────
192+
// Near-miss threshold
193193
// A user is "near miss" if their value is within 20% of triggering.
194194
const NEAR_MISS_RATIO = 0.2
195195

@@ -207,7 +207,7 @@ function isNearMissMax(actual: number, limit: number): boolean {
207207
return actual >= limit * (1 - NEAR_MISS_RATIO)
208208
}
209209

210-
// ─── Content analysis helpers ──────────────────────────────────
210+
// Content analysis helpers
211211

212212
/**
213213
* Detect the dominant script/language of text using Unicode code-point ranges.
@@ -355,7 +355,7 @@ function isLikelyLanguage(text: string, language: string): boolean {
355355
return detection.dominant === expected && detection.confidence > 0.3
356356
}
357357

358-
// ─── Crypto address detection ──────────────────────────────────
358+
// Crypto address detection
359359

360360
const CRYPTO_PATTERNS: { name: string; pattern: RegExp }[] = [
361361
// Bitcoin (legacy P2PKH/P2SH + SegWit bech32)
@@ -386,7 +386,7 @@ function detectCryptoAddress(
386386
return null
387387
}
388388

389-
// ─── Pipeline ──────────────────────────────────────────────────
389+
// Pipeline
390390

391391
/**
392392
* Run all enabled rules against a GitHub user, collecting detailed
@@ -569,7 +569,7 @@ export async function runFilterPipeline(
569569
contentScope: scope,
570570
}
571571

572-
// ─── autoWhitelistGlobalVouches ───────────────────────────
572+
// autoWhitelistGlobalVouches
573573
if (config.autoWhitelistGlobalVouches.enabled) {
574574
const minVouches = config.autoWhitelistGlobalVouches.minVouches
575575
const vouchRows = await db
@@ -597,7 +597,7 @@ export async function runFilterPipeline(
597597
}
598598
}
599599

600-
// ─── vouchedUsersOnly ──────────────────────────────────────
600+
// vouchedUsersOnly
601601
// Non-vouched users are rejected before any per-user GitHub lookups.
602602
// Whitelisted users already returned above (covers "repo" scope).
603603
// When vouchScope is "global" or "both", also check global vouches.
@@ -765,7 +765,7 @@ export async function runFilterPipeline(
765765
}
766766
}
767767

768-
// ─── accountAge ────────────────────────────────────────────
768+
// accountAge
769769
if (ruleApplies(config.accountAge, contentType, scope) && ghUser) {
770770
rulesChecked++
771771
const createdAt = new Date(ghUser.created_at as string)
@@ -797,7 +797,7 @@ export async function runFilterPipeline(
797797
}
798798
}
799799

800-
// ─── minMergedPrs ──────────────────────────────────────────
800+
// minMergedPrs
801801
if (ruleApplies(config.minMergedPrs, contentType, scope)) {
802802
rulesChecked++
803803
try {
@@ -830,7 +830,7 @@ export async function runFilterPipeline(
830830
}
831831
}
832832

833-
// ─── languageRequirement ───────────────────────────────────
833+
// languageRequirement
834834
if (
835835
ruleApplies(config.languageRequirement, contentType, scope) &&
836836
contentText &&
@@ -860,7 +860,7 @@ export async function runFilterPipeline(
860860
}
861861
}
862862

863-
// ─── maxPrsPerDay ──────────────────────────────────────────
863+
// maxPrsPerDay
864864
if (ruleApplies(config.maxPrsPerDay, contentType, scope)) {
865865
rulesChecked++
866866
try {
@@ -897,7 +897,7 @@ export async function runFilterPipeline(
897897
}
898898
}
899899

900-
// ─── maxFilesChanged ───────────────────────────────────────
900+
// maxFilesChanged
901901
if (ruleApplies(config.maxFilesChanged, contentType, scope) && ctx.prNumber) {
902902
rulesChecked++
903903
try {
@@ -940,7 +940,7 @@ export async function runFilterPipeline(
940940
}
941941
}
942942

943-
// ─── repoActivityMinimum ───────────────────────────────────
943+
// repoActivityMinimum
944944
if (ruleApplies(config.repoActivityMinimum, contentType, scope)) {
945945
rulesChecked++
946946
try {
@@ -977,7 +977,7 @@ export async function runFilterPipeline(
977977
}
978978
}
979979

980-
// ─── requireProfileReadme ──────────────────────────────────
980+
// requireProfileReadme
981981
if (ruleApplies(config.requireProfileReadme, contentType, scope)) {
982982
rulesChecked++
983983
try {
@@ -1010,7 +1010,7 @@ export async function runFilterPipeline(
10101010
}
10111011
}
10121012

1013-
// ─── cryptoAddressDetection ────────────────────────────────
1013+
// cryptoAddressDetection
10141014
if (
10151015
ruleApplies(config.cryptoAddressDetection, contentType, scope) &&
10161016
contentText
@@ -1124,7 +1124,7 @@ export async function runFilterPipeline(
11241124
}
11251125
}
11261126

1127-
// ─── Pipeline event logging ────────────────────────────────────
1127+
// Pipeline event logging
11281128

11291129
/**
11301130
* Generate a unique pipeline ID for grouping events from the same evaluation.
@@ -1292,7 +1292,7 @@ async function logPipelineEvents(
12921292
await logEvents(eventBatch)
12931293
}
12941294

1295-
// ─── Webhook action handlers ───────────────────────────────────
1295+
// Webhook action handlers
12961296

12971297
/**
12981298
* Execute the resolved action on a PR/issue/comment based on the pipeline result.

packages/core/src/rules.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
cleanForLanguageDetection,
1717
} from "./language-detection"
1818

19-
// ─── Crypto Patterns (exact copy from filter-pipeline.ts) ──────
19+
// Crypto Patterns (exact copy from filter-pipeline.ts)
2020

2121
const CRYPTO_PATTERNS: { name: string; pattern: RegExp }[] = [
2222
{ name: "Bitcoin", pattern: /\b(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}\b/ },
@@ -36,7 +36,7 @@ function detectCryptoAddress(
3636
return null
3737
}
3838

39-
// ─── Near-miss helpers (exact copy from filter-pipeline.ts) ────
39+
// Near-miss helpers (exact copy from filter-pipeline.ts)
4040

4141
const NEAR_MISS_RATIO = 0.2
4242

packages/db/src/schema/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"
22
import { relations } from "drizzle-orm"
33

4-
// ─── Better Auth core tables ─────────────────────────────────────
4+
// Better Auth core tables
55
// Managed by better-auth. We define them here so Drizzle is aware of
66
// them for relations / migrations.
77

packages/db/src/schema/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"
22
import { user } from "./auth"
33

4-
// ─── Better Auth MCP plugin (OIDC provider schema) ───────────────
4+
// Better Auth MCP plugin (OIDC provider schema)
55

66
export const oauthApplication = pgTable("oauth_application", {
77
id: text("id").primaryKey(),

packages/db/src/schema/orgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { pgTable, text, timestamp } from "drizzle-orm/pg-core"
22
import { relations } from "drizzle-orm"
33
import { user } from "./auth"
44

5-
// ─── Better Auth organization plugin tables ──────────────────────
5+
// Better Auth organization plugin tables
66

77
export const organization = pgTable("organization", {
88
id: text("id").primaryKey(),

packages/env/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createEnv } from "@t3-oss/env-core"
55
import { config as loadDotenv } from "dotenv"
66
import { z } from "zod"
77

8-
// ─── Root .env autoload ──────────────────────────────────────────
8+
// Root .env autoload
99
// Walk up from this file to the monorepo root (marked by pnpm-workspace.yaml)
1010
// and load .env from there. dotenv is idempotent — vars already in
1111
// process.env (e.g. injected by Vite / Nitro / CI) win.

0 commit comments

Comments
 (0)