Skip to content

Commit bc512ad

Browse files
author
Kevin Hopper
committed
Remove PII from test fixtures, add getSiteUrl proxy support for blog
- Genericize tax test fixture data (round numbers instead of real W-2 values) - Update all test assertions to match new fixture values - Remove stale 6013(h) and non-K-12 educator test scenarios - Add W-2 Employee SSN (Box a) to FFFF cross-reference checklist and filing instructions - Replace specific employer name in ffff-quirks.md with generic reference - Add getSiteUrl() helper to blog-public.js for X-Forwarded-Host support when served behind a reverse proxy (e.g. maestro.press/blog/)
1 parent ced9b0d commit bc512ad

7 files changed

Lines changed: 133 additions & 163 deletions

File tree

bundles/browser/scripts/ffff/ffff-quirks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Most Texas public school teachers pay into TRS (Teacher Retirement System) inste
7575
- **Box 6 (Medicare tax): POPULATED**
7676
- **Box 13 (Retirement plan): CHECKED**
7777

78-
Austin ISD is an exception — their employees DO pay Social Security.
78+
Some Texas districts are exceptions and DO pay Social Security. Check the employee's W-2 to confirm.
7979

8080
## 6013(h) Election Statement
8181

bundles/browser/skills/ffff-filing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Strategy:
145145

146146
FFFF Step 2 ("Verify Federal Withholding") is a separate tab. Navigate by clicking the Step 2 tab text in the main frame.
147147

148-
W-2 forms are entered here with all box values (1-6, 12, 13). **This is where the actual W-2 data lives**the 1040 Line 25a just shows the total.
148+
W-2 forms are entered here with all box values (Box a Employee SSN, 1-6, 12, 13). **Box a (Employee SSN) is required for each W-2 — a blank SSN will cause the IRS to reject the e-file.** The 1040 Line 25a just shows the withholding total.
149149

150150
After entering W-2 data:
151151
- **Line A1** should equal total of all W-2 Box 2 values
@@ -158,7 +158,7 @@ After entering W-2 data:
158158

159159
Before saving, run an automated cross-reference of ALL FFFF values against the source documents and crow-tax engine. Navigate to each form in the tree, read all field values, and compare:
160160

161-
**For each W-2:** Compare every box (1-6, 12, 13, EIN, employee name) against the original PDF.
161+
**For each W-2:** Compare Box a (Employee SSN), boxes 1-6, 12, 13, EIN, and employee name against the original PDF. **Box a is critical** — a blank Employee SSN will cause the IRS to reject the e-file.
162162
**For Form 1040:** Compare Lines 1a, 9, 10, 11a, 12e, 15, 16, 20, 24, 25a, 33, 34 against crow-tax `crow_tax_get_form`.
163163
**For Schedule 1:** Compare Lines 11, 13, 21, 26 against crow-tax.
164164
**For Form 8889:** Compare Lines 6, 9, 14a, 14c, 15, 16 against 1099-SA and W-2 code W values.

bundles/tax/tests/engine.test.js

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -55,45 +55,41 @@ describe("Tax tables", () => {
5555
describe("Calculator — John & Jane 2025", () => {
5656
const { result, forms, warnings, errors } = processReturn(fixture);
5757

58-
it("should calculate without schema errors", () => {
59-
// Only validation "error" is John's non-K-12 educator expense — this is expected
60-
assert.equal(errors.length, 1);
61-
assert.ok(errors[0].includes("John Q. Public"));
62-
assert.ok(errors[0].includes("not a K-12 school"));
58+
it("should calculate without errors", () => {
59+
assert.equal(errors.length, 0);
6360
assert.ok(result !== null);
6461
});
6562

6663
it("should compute total wages correctly", () => {
67-
// W-2 #1: $60,000.21 + W-2 #2: $76,962.38 = $136,962.59
68-
assert.equal(result.income.totalWages, 136962.59);
64+
// W-2 #1: $55,000 + W-2 #2: $72,000 = $127,000
65+
assert.equal(result.income.totalWages, 127000);
6966
});
7067

7168
it("should NOT deduct HSA employer contributions", () => {
72-
// Employer contributed $470.58 via W-2 code W
69+
// Employer contributed $1,200 via W-2 code W
7370
// Personal contributions are $0
7471
// HSA deduction should be $0
7572
assert.equal(result.adjustments.hsaDeduction, 0);
7673
});
7774

7875
it("should only allow qualified educator expenses", () => {
79-
// Jane: teacher, K-12, 1800hrs → qualifies, $300 (capped from $450)
80-
// John: counselor, NOT K-12 → disqualified, $0
76+
// Jane: teacher, K-12, 1800hrs → qualifies, $300
8177
assert.equal(result.adjustments.educatorExpenseDeduction, 300);
8278
});
8379

8480
it("should compute student loan interest deduction", () => {
85-
// $170.58 paid, under $2500 cap, AGI well under phaseout
86-
assert.equal(result.adjustments.studentLoanDeduction, 170.58);
81+
// $1,250 paid, under $2,500 cap, AGI under phaseout
82+
assert.equal(result.adjustments.studentLoanDeduction, 1250);
8783
});
8884

8985
it("should compute total adjustments", () => {
90-
// educator $300 + HSA $0 + student loan $170.58 = $470.58
91-
assert.equal(result.adjustments.totalAdjustments, 470.58);
86+
// educator $300 + HSA $0 + student loan $1,250 = $1,550
87+
assert.equal(result.adjustments.totalAdjustments, 1550);
9288
});
9389

9490
it("should compute AGI correctly", () => {
95-
// $136,962.59 - $470.58 = $136,492.01
96-
assert.equal(result.agi, 136492.01);
91+
// $127,000 - $1,550 = $125,450
92+
assert.equal(result.agi, 125450);
9793
});
9894

9995
it("should use standard deduction for MFJ", () => {
@@ -102,48 +98,43 @@ describe("Calculator — John & Jane 2025", () => {
10298
});
10399

104100
it("should compute taxable income", () => {
105-
// $136,492.01 - $30,000 = $106,492.01 → floor to $106,492
106-
assert.equal(result.taxableIncome, 106492);
101+
// $125,450 - $30,000 = $95,450
102+
assert.equal(result.taxableIncome, 95450);
107103
});
108104

109105
it("should compute bracket tax correctly", () => {
110-
// MFJ brackets on $106,492:
106+
// MFJ brackets on $95,450:
111107
// 10% on first $23,850 = $2,385.00
112-
// 12% on $23,850-$96,950 = $8,772.00
113-
// 22% on $96,950-$106,492 = $2,099.24
114-
// Total = $13,256.24
115-
assert.equal(result.tax.bracketTax, 13256.24);
108+
// 12% on $23,850-$95,450 = $8,592.00
109+
// Total = $10,977
110+
assert.equal(result.tax.bracketTax, 10977);
116111
});
117112

118113
it("should compute total tax", () => {
119-
assert.equal(result.result.totalTax, 13256.24);
114+
assert.equal(result.result.totalTax, 10977);
120115
});
121116

122117
it("should compute federal withholding", () => {
123-
// W-2 #1: $4,200 + W-2 #2: $8,480 = $12,680
124-
assert.equal(result.payments.federalWithheld, 12680);
118+
// W-2 #1: $4,400 + W-2 #2: $7,200 = $11,600
119+
assert.equal(result.payments.federalWithheld, 11600);
125120
});
126121

127-
it("should compute amount owed", () => {
128-
// $12,680 payments - $13,256.24 tax = -$576.24 (owed)
129-
assert.ok(result.result.refundOrOwed < 0);
130-
assert.equal(Math.abs(result.result.refundOrOwed), 576.24);
122+
it("should compute refund", () => {
123+
// $11,600 payments - $10,977 tax = $623 refund
124+
assert.ok(result.result.refundOrOwed > 0);
125+
assert.equal(result.result.refundOrOwed, 623);
131126
});
132127

133128
it("should have HSA taxable distributions = $0 (all qualified)", () => {
134-
// $420 distributions, $420 qualified expenses → $0 taxable
129+
// $850 distributions, $850 qualified expenses → $0 taxable
135130
assert.equal(result.income.hsaTaxableDistributions, 0);
136131
});
137132

138133
it("should generate workPapers audit trail", () => {
139134
assert.ok(result.workPapers.length > 0);
140135
const agiPaper = result.workPapers.find(w => w.line === "1040.11");
141136
assert.ok(agiPaper);
142-
assert.equal(agiPaper.value, 136492.01);
143-
});
144-
145-
it("should detect 6013(h) warning", () => {
146-
assert.ok(warnings.some(w => w.includes("6013(h)")));
137+
assert.equal(agiPaper.value, 125450);
147138
});
148139

149140
it("should generate required forms", () => {
@@ -162,7 +153,7 @@ describe("Form 8889 — HSA", () => {
162153
});
163154

164155
it("should show employer contributions on line 9", () => {
165-
assert.equal(f8889["9"], 470.58);
156+
assert.equal(f8889["9"], 1200);
166157
});
167158

168159
it("should have $0 personal deduction on line 13", () => {
@@ -171,7 +162,7 @@ describe("Form 8889 — HSA", () => {
171162
});
172163

173164
it("should have $0 taxable distributions on line 16", () => {
174-
// $420 distributions - $420 qualified expenses = $0
165+
// $850 distributions - $850 qualified expenses = $0
175166
assert.equal(f8889["16"], 0);
176167
});
177168
});
@@ -182,7 +173,7 @@ describe("Validation rules", () => {
182173
...fixture,
183174
hsa: {
184175
...fixture.hsa,
185-
personalContributions: 5000, // $470.58 employer + $5000 = exceeds $4,300 self limit
176+
personalContributions: 5000, // $1,200 employer + $5,000 = exceeds $4,300 self limit
186177
},
187178
};
188179
const { errors } = processReturn(overContrib);

bundles/tax/tests/fixtures/2025-sample.json

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@
1616
"w2s": [
1717
{
1818
"employer": "Acme Corporation",
19-
"wages": 60000.21,
20-
"federalWithheld": 4200.00,
21-
"ssWages": 60000.21,
22-
"ssTaxWithheld": 3720.01,
23-
"medicareWages": 60000.21,
24-
"medicareTaxWithheld": 870.00,
19+
"wages": 55000.00,
20+
"federalWithheld": 4400.00,
21+
"ssWages": 55000.00,
22+
"ssTaxWithheld": 3410.00,
23+
"medicareWages": 55000.00,
24+
"medicareTaxWithheld": 797.50,
2525
"stateWages": 0,
2626
"stateWithheld": 0,
2727
"code12": [],
2828
"isStatutoryEmployee": false
2929
},
3030
{
3131
"employer": "Widget Industries",
32-
"wages": 76962.38,
33-
"federalWithheld": 8480.00,
34-
"ssWages": 76962.38,
35-
"ssTaxWithheld": 4771.67,
36-
"medicareWages": 76962.38,
37-
"medicareTaxWithheld": 1115.95,
32+
"wages": 72000.00,
33+
"federalWithheld": 7200.00,
34+
"ssWages": 72000.00,
35+
"ssTaxWithheld": 4464.00,
36+
"medicareWages": 72000.00,
37+
"medicareTaxWithheld": 1044.00,
3838
"stateWages": 0,
3939
"stateWithheld": 0,
4040
"code12": [
41-
{ "code": "W", "amount": 470.58 }
41+
{ "code": "W", "amount": 1200.00 }
4242
],
4343
"isStatutoryEmployee": false
4444
}
4545
],
4646
"income1099": {
4747
"sa": [
4848
{
49-
"payer": "Optum Bank",
50-
"grossDistribution": 420.00,
49+
"payer": "First National HSA",
50+
"grossDistribution": 850.00,
5151
"distributionCode": 1,
5252
"hsaOrMsa": "hsa"
5353
}
@@ -59,37 +59,28 @@
5959
"misc": []
6060
},
6161
"deductions": {
62-
"studentLoanInterest": 170.58,
62+
"studentLoanInterest": 1250.00,
6363
"educatorExpenses": [
6464
{
6565
"name": "Jane A. Public",
6666
"role": "teacher",
6767
"k12School": true,
6868
"hoursPerYear": 1800,
69-
"amount": 450
70-
},
71-
{
72-
"name": "John Q. Public",
73-
"role": "counselor",
74-
"k12School": false,
75-
"hoursPerYear": 1200,
76-
"amount": 200
69+
"amount": 300
7770
}
7871
]
7972
},
8073
"hsa": {
8174
"coverageType": "self",
82-
"employerContributions": 470.58,
75+
"employerContributions": 1200.00,
8376
"personalContributions": 0,
84-
"distributions": 420.00,
85-
"qualifiedExpenses": 420.00,
77+
"distributions": 850.00,
78+
"qualifiedExpenses": 850.00,
8679
"distributionCode": 1,
8780
"monthsCovered": 12,
8881
"hadHdhpFullYear": true,
8982
"catchUp55": false
9083
},
91-
"specialSituations": {
92-
"nonresidentSpouseElection": true,
93-
"spouseGreenCardDate": "2025-01-01"
94-
}
84+
"specialSituations": {}
85+
9586
}

bundles/tax/tests/forms.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,31 @@ describe("Form 1040 lines", () => {
6666
const lines = getFormLines("f1040", result, fixture);
6767

6868
it("should map wages to line 1a", () => {
69-
assert.equal(lines["1a"], 136962.59);
69+
assert.equal(lines["1a"], 127000);
7070
});
7171

7272
it("should map AGI to line 11", () => {
73-
assert.equal(lines["11"], 136492.01);
73+
assert.equal(lines["11"], 125450);
7474
});
7575

7676
it("should map standard deduction to line 12", () => {
7777
assert.equal(lines["12"], 30000);
7878
});
7979

8080
it("should map taxable income to line 15", () => {
81-
assert.equal(lines["15"], 106492);
81+
assert.equal(lines["15"], 95450);
8282
});
8383

8484
it("should map bracket tax to line 16", () => {
85-
assert.equal(lines["16"], 13256.24);
85+
assert.equal(lines["16"], 10977);
8686
});
8787

8888
it("should map federal withholding to line 25a", () => {
89-
assert.equal(lines["25a"], 12680);
89+
assert.equal(lines["25a"], 11600);
9090
});
9191

92-
it("should show amount owed on line 37", () => {
93-
assert.equal(lines["37"], 576.24);
92+
it("should show refund on line 34", () => {
93+
assert.equal(lines["34"], 623);
9494
});
9595
});
9696

@@ -107,11 +107,11 @@ describe("Schedule 1 lines", () => {
107107
});
108108

109109
it("should map student loan interest to line 20", () => {
110-
assert.equal(lines["20"], 170.58);
110+
assert.equal(lines["20"], 1250);
111111
});
112112

113113
it("should map total adjustments to line 26", () => {
114-
assert.equal(lines["26"], 470.58);
114+
assert.equal(lines["26"], 1550);
115115
});
116116
});
117117

0 commit comments

Comments
 (0)