Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 4 additions & 40 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,7 @@
## Problem
## What

What verified problem does this solve?
## Why

Reference:
- User feedback
- Benchmark
- Incident
- Security finding
## How tested

*(If none, close this PR.)*

---

## Evidence Before

Current numbers:

TTFV:
Memory:
Latency:
Error rate:
Queue delay:

---

## Evidence After

New numbers:

TTFV:
Memory:
Latency:
Error rate:
Queue delay:

---

## Risk

What could this break?

Rollback plan?
## Screenshots (if applicable)
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/perf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## What and why

## Evidence before

TTFV:
Memory:
Latency:
Error rate:
Queue delay:

## Evidence after

TTFV:
Memory:
Latency:
Error rate:
Queue delay:

## How tested

## Risk and rollback plan
4 changes: 0 additions & 4 deletions .github/workflows/assignment-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,5 @@ jobs:

if (context.eventName === 'issues') {
await github.rest.issues.createComment({ ...context.repo, issue_number: context.issue.number, body: message });
await github.rest.issues.removeAssignees({ ...context.repo, issue_number: context.issue.number, assignees: [username] });
} else if (context.eventName === 'pull_request') {
await github.rest.issues.createComment({ ...context.repo, issue_number: context.payload.pull_request.number, body: message });
await github.rest.pulls.update({ ...context.repo, pull_number: context.payload.pull_request.number, state: 'closed' });
}
}
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://x:x@localhost:5432/x
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_Zm9yZ2VsZW5zLmNvbQ==
CLERK_SECRET_KEY: sk_test_placeholder
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
36 changes: 7 additions & 29 deletions .github/workflows/db-migration-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,13 @@ on:
jobs:
check-migrations:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: forgelens
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --filter db...

# Ponytail: Just push the schema to the ephemeral DB to see if it blows up
- name: Dry Run Migration
env:
DATABASE_URL: postgresql://user:password@localhost:5432/forgelens
run: pnpm --filter db run db:push
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Check migration consistency
run: pnpm --filter @forgelens/db exec drizzle-kit check
31 changes: 19 additions & 12 deletions .github/workflows/enforce-evidence.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
name: Enforce PR Evidence
on:
pull_request:
types: [opened, edited, synchronize]
types: [opened, edited, synchronize, labeled, unlabeled]

jobs:
enforce-evidence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: changed
uses: dorny/paths-filter@v3
with:
filters: |
relevant:
- 'packages/github/**'
- 'apps/web/src/inngest/**'
- 'packages/db/src/**'
- name: Check PR Body for Evidence
uses: actions/github-script@v6
if: contains(github.event.pull_request.labels.*.name, 'perf') || steps.changed.outputs.relevant == 'true'
uses: actions/github-script@v7
with:
script: |
const body = context.payload.pull_request.body;
if (!body) {
core.setFailed("PR body is empty. Please fill out the PR template.");
return;
}
// Ponytail: ultra simple regex to check if they filled out the numbers
const missingBefore = body.includes("TTFV:\nMemory:\nLatency:");
const missingAfter = body.includes("New numbers:\n\nTTFV:\nMemory:\nLatency:");

const body = (context.payload.pull_request.body || '').replace(/\r\n/g, '\n');
const emptyMetrics = /TTFV:\s*Memory:\s*Latency:\s*(?:Error rate:\s*)?(?:Queue delay:\s*)?(?:$|\n)/m;
const missingBefore = emptyMetrics.test(body);
const missingAfter = body.includes('New numbers:') && emptyMetrics.test(body);
if (missingBefore || missingAfter) {
core.setFailed("Directive 002 violation: You must provide benchmark evidence in the PR template. Do not leave the metrics blank.");
core.setFailed('Performance changes must include benchmark evidence in the PR body.');
}
15 changes: 7 additions & 8 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manage Stale Issues and PRs
on:
schedule:
- cron: '0 * * * *' # Runs every hour
- cron: '0 9 * * *' # Runs daily

permissions:
issues: write
Expand All @@ -13,15 +13,14 @@ jobs:
steps:
- uses: actions/stale@v8
with:
days-before-stale: 4
days-before-close: 2
stale-issue-message: 'This issue has been inactive for 4 days. It has been marked as stale and the assignee will be removed shortly to allow others to work on it.'
stale-pr-message: 'This PR has been inactive for 4 days. @maintainer @contributor please review or push updates, otherwise it will be closed in 2 days.'
close-issue-message: 'This issue was closed due to inactivity.'
close-pr-message: 'This PR was closed due to inactivity.'
days-before-issue-stale: 14
days-before-issue-close: -1
days-before-pr-stale: -1
days-before-pr-close: -1
stale-issue-message: 'This issue has been inactive for 14 days. It has been marked stale and its assignee removed so others can pick it up.'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'pinned,security'
exempt-pr-labels: 'do-not-merge'
remove-issue-stale-when-updated: true
remove-pr-stale-when-updated: true
remove-issue-assignees-when-stale: true
149 changes: 39 additions & 110 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,130 +1,59 @@
# Contributing to VoidSwift
# Contributing to ForgeLens

First off, thank you for your interest in contributing to **VoidSwift**! ❤️
Thanks for being here! Whether you fix a typo or ship a feature, you're welcome. This guide is short on purpose.

Whether you're fixing bugs, improving documentation, or adding new features, every contribution helps make the project better. Please read these guidelines before getting started.
## Our promise

---
**You will get a first maintainer response on your pull request within 72 hours.** We never auto-close PRs for inactivity. If you haven't heard from us in 72 hours, ping a maintainer in the PR or on Discord. That's on us, not you.

# Getting Started
## Pick an issue

1. Fork the repository.
2. Clone your fork locally.
3. Create a new branch from the default branch.
4. Make your changes.
5. Test your changes (if applicable).
6. Commit your changes with a clear commit message.
7. Push your branch and open a Pull Request.
1. Browse issues labelled `good first issue` (starter ideas live in [docs/GOOD_FIRST_ISSUES.md](docs/GOOD_FIRST_ISSUES.md)).
2. Comment `.take` on an unassigned issue and you are assigned automatically.
3. Please hold at most 3 assigned issues at a time. If you can't continue, just say so and we'll free it up. Assigned issues quiet for 14 days get unassigned (never closed), so someone else can pick them up.
4. Want to do something bigger? Open an issue first so we can agree on the approach.

---
## Set up locally (about 10 minutes)

# Before You Start
Follow "Quick start" in the [README](README.md). You need Node 20+, pnpm 9 and Docker.

* Search existing issues before opening a new one.
* If you're planning a large feature or significant change, open an issue first so we can discuss the best approach.
* Keep each Pull Request focused on a single feature or fix.
* Read this document completely before contributing.
## Run the checks locally

---
```bash
pnpm lint
pnpm typecheck
pnpm test
pnpm build
```

# Contribution Limits
Run all four before pushing; they are the same steps CI runs.

To keep contributions active and ensure everyone gets a chance to contribute:
## What CI checks, and why

* A contributor may have **up to 3 assigned issues** at any given time.
* A contributor may have **up to 3 open Pull Requests** at any given time.
* If you are unable to continue working on an assigned issue, please let us know so it can be reassigned.
* Issues that remain **inactive for 2-3 days** without any progress or updates may be **unassigned**.
* Pull Requests that remain **inactive for 2-3 days** without responding to review comments or showing progress may be **closed**.
| Check | Why |
| --- | --- |
| `pnpm lint` | Consistent code style and common bug patterns. |
| `pnpm typecheck` | TypeScript errors across every package, caught before runtime. |
| `pnpm test` | The scoring engine in `packages/domain-analytics` must stay correct. |
| `pnpm build` | The app has to compile. |
| DB migration check | If you touch `packages/db/src/schemas`, run `pnpm db:generate` and commit the new migration. |
| PR evidence (only for performance work) | PRs labelled `perf`, or touching `packages/github`, `apps/web/src/inngest` or `packages/db/src`, need before/after numbers. Use the template `.github/PULL_REQUEST_TEMPLATE/perf.md` (add `?template=perf.md` to the PR URL). UI and docs PRs skip this. |

> **Waiting for Review?**
>
> If your Pull Request is waiting for a maintainer's review and you haven't received any response within **2-3 days**, please join our **VoidSwift Discord** and politely ping a **Maintainer** or **Project Admin**. This helps ensure your PR isn't accidentally missed.
Green means the code works; red means something real is wrong.

---
## Pull requests

# Pull Request Guidelines
- One issue or feature per PR. Link it with `Closes #123`.
- Use [Conventional Commits](https://www.conventionalcommits.org/) (`fix(web): ...`, `docs: ...`).
- Fill in the short template: What / Why / How tested / Screenshots.
- Never invent numbers (scores, benchmarks) in docs or UI. Scores come only from `packages/domain-analytics`, never from an LLM.

Before opening a Pull Request, please ensure that:
## Reporting bugs and requesting features

* Your PR solves only **one issue** or introduces **one feature**.
* Your branch is up to date with the default branch.
* Your commit messages are meaningful and descriptive.
* You link related issues using:
Search existing issues first. For bugs include steps to reproduce, expected vs. actual behavior, and your environment. For features, describe the problem before the solution.

* `Closes #123`
* `Fixes #123`
* You update documentation if your changes require it.
* Your code follows the project's existing style.
* Your PR is ready for review.
## Community and conduct

---
Chat with maintainers on the project Discord. Be respectful, constructive and welcoming. Harassment, abuse and spam are not tolerated.

# Code Style

Please follow the existing coding style of the project.

* Write clean and readable code.
* Avoid unnecessary refactoring.
* Keep changes focused.
* Add tests whenever possible, especially for bug fixes.
* Remove debugging code before submitting your PR.

---

# Good First Contributions

If you're new to the project, look for issues labeled:

* `good first issue`
* `help wanted`

These issues are intended for new contributors.

---

# Reporting Bugs

When opening a bug report, please include:

* Clear description of the issue.
* Steps to reproduce.
* Expected behavior.
* Actual behavior.
* Screenshots or logs (if applicable).
* Environment details (OS, version, etc.).

---

# Feature Requests

Before requesting a feature:

* Check existing issues to avoid duplicates.
* Clearly explain the problem you're trying to solve.
* Describe your proposed solution.
* Include any additional context if needed.

---

# Community

For discussions, support, announcements, and faster communication, please join the **VoidSwift Discord**.

If you're actively contributing, we highly recommend joining the Discord server so maintainers can communicate with you easily regarding reviews, changes, or issue assignments.

---

# Code of Conduct

Please be respectful, constructive, and welcoming.

Harassment, abusive language, spam, or toxic behavior will not be tolerated. We want VoidSwift to be a friendly and inclusive community for everyone.

---

# Thank You ❤️

Every contribution, whether it's code, documentation, bug reports, or suggestions, helps improve VoidSwift.

Thank you for being part of our community. Happy coding! 🚀
Thank you for helping make ForgeLens better!
Loading
Loading