government

commit 856d84d1b545be4936dea4e0fad4488a38d1e0ba

tree

parent:
1e3679e075694dda43bb3b82dd39f993c8e7705a

nmyk <nick@nmyk.io>

2026-11-14T21:35:30-05:00

CLI improvements

rename flags to correspond to x509 fields
dates can all be yyyy-mm-dd or rfc3339

diff --git a/DESIGN.md b/DESIGN.md
index fe3c0ece674a62668c4c2a46d50968282626575b..c63ae17681c0df2df398b8e4d52898c70c9e8e4b 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -49,7 +49,7 @@ | Serial | 1 | i + 1 | n + 1 |
 | Signature | Ed25519 (author key) | Ed25519 (key of cert i−1) | Ed25519 (key of cert n−1) |
 | Subject | `CN=<author or GOVERNMENT Anchor>, O=<program>` | `CN=GOVERNMENT Depth i, O=<program>` | `CN=GOVERNMENT Depth n, O=<program>` |
 | subjectAltName | author email, if given | absent | absent |
-| Validity | `--effective` to `--expires` (default 2000-01-01 to 9999-12-31) | same | same |
+| Validity | `--not-before` to `--not-after` (default 2000-01-01 to 9999-12-31) | same | same |
 | basicConstraints (critical) | CA:TRUE | CA:TRUE | CA:FALSE |
 | keyUsage (critical) | keyCertSign, cRLSign | keyCertSign, cRLSign | digitalSignature |
 | certificatePolicies | absent | cert 1: the top-level node OIDs; certs 2..n−1: `anyPolicy` only, plus any node that carries notes | `anyPolicy` only, plus any node that carries notes |
@@ -333,10 +333,10 @@ | `government prog.gov` | Same as `government run prog.gov`, as with `python prog.py`. A command name always wins over a file of the same name, and an argument that is neither a file nor a `.gov` name is reported as an unknown command |
 | `government verify prog.gov` | Ratify and decode only; print the certificate of ratification; exit 0 if the program is lawful |
 | `government tree prog.gov` | Print the policy tree, with `GOV` abbreviated, payloads decoded and notes shown |
 | `government decompile prog.gov` | Print equivalent Lisp source, notes restored as comments |
-| `government compile prog.gov.lisp -o prog.gov` | Run the transpiler (`--key`, `--author`, `--seed`, `--effective`, `--expires`, `--name`, `--source`, `--no-share`) |
-| `government repeal prog.gov -o repeal.crl` | Write a CRL repealing the program (`--key` or `--seed`, `--reason`, `--at`, `--issued`, `--next-update`; `--next-update` defaults to 9999-12-31, a permanent repeal) |
+| `government compile prog.gov.lisp -o prog.gov` | Run the transpiler (`--key`, `--author`, `--seed`, `--not-before`, `--not-after`, `--name`, `--source`, `--no-comments`, `--no-share`) |
+| `government repeal prog.gov -o repeal.crl` | Write a CRL repealing the program (`--key` or `--seed`, `--reason`, `--at`, `--last-update`, `--next-update`; `--next-update` defaults to 9999-12-31, a permanent repeal) |
 
-Shared flags: `--at <RFC 3339 time>`, `--anchor <cert or public key PEM>`, `--crl <file>` (repeatable), `--max-nodes <n>`.
+Shared flags: `--at <RFC 3339 time or YYYY-MM-DD>`, `--anchor <cert or public key PEM>`, `--crl <file>` (repeatable), `--max-nodes <n>`.
 
 The CLI is built on [cobra](https://github.com/spf13/cobra), so flags follow GNU style: long flags take two dashes, `-o` is short for `--output`, flags may come before or after the file name, and `government <command> --help` lists a command's flags.
 
@@ -407,7 +407,7 @@ | Language | `testdata/*.gov.lisp` | All semantics: arithmetic, comparisons, truthiness, `if`, `quote`, lists, `define`, closures, scoping, recursion, higher-order functions, strings and Unicode |
 | Shape stress | `testdata/*.gov.lisp` | 200-deep nesting (201 certs), 1,000-argument calls, wide `quote`d lists, shared subexpressions |
 | Round trip | Go test over every `testdata` file | `gov2lisp(lisp2gov(src))` equals the normalized source, comments included |
 | Ratification | Go table test that mutates a valid chain | Flipped signature byte, reordered certs, dropped mapping, orphaned policy, mapping in cert n, `anyPolicy` missing from a cert 2..n or asserted in cert 1, a list node with no elements, unknown critical extension; each expects a specific error |
-| Civic | Go table test | Runs before, inside and after an `--effective`/`--expires` window; repeal of each depth; scheduled repeal; stale CRL; CRL signed by the wrong key; `--anchor` pin across a re-ratified version; notes over 200 characters; default-key warning |
+| Civic | Go table test | Runs before, inside and after a `--not-before`/`--not-after` window; repeal of each depth; scheduled repeal; stale CRL; CRL signed by the wrong key; `--anchor` pin across a re-ratified version; notes over 200 characters; default-key warning |
 | Golden | One checked-in `.gov` | Byte equality, proving determinism |
 | External oracle (optional) | `openssl verify -policy_check -explicit_policy -policy 2.5.29.32.0`, plus `-crl_check` | OpenSSL accepts every valid program, rejects broken ones, and agrees on repeals. Without `-policy 2.5.29.32.0` OpenSSL treats the acceptable set as empty |
 
@@ -421,7 +421,7 @@ ### Effective dates
 
 A program is in force only between its start and end dates.
 
-- `government compile --effective 2027-01-01 --expires 2027-12-31` sets `notBefore` and `notAfter` on every cert. The defaults are 2000-01-01 and 9999-12-31 (no expiry).
+- `government compile --not-before 2027-01-01 --not-after 2027-12-31T00:00:00Z` sets `notBefore` and `notAfter` on every cert, named for the X.509 fields they fill. Each takes an RFC 3339 time or a date, meaning midnight UTC at its start. The defaults are 2000-01-01 and 9999-12-31 (no expiry).
 - The interpreter checks every cert's window at the check time (`--at`, default now). The program's window is the overlap of all of them.
 - Before the window: `E-NOT-IN-FORCE: takes effect 2027-01-01T00:00:00Z`. After it: `E-LAPSED: expired 2027-12-31T00:00:00Z`. Both exit with code 2.
 
@@ -446,6 +446,7 @@
 - **Encoding.** Each policy entry may carry RFC 5280 user-notice qualifiers (`id-qt-unotice`, `1.3.6.1.5.5.7.2.2`) whose `explicitText` is a UTF8String. RFC 5280 caps `explicitText` at 200 characters, so a longer note is split across several qualifiers and joined back in order. A node below depth 1 is normally created through `anyPolicy` and would take its (empty) qualifiers, so a node with a note is also listed explicitly in its cert; the explicit entry wins, because RFC 9618 step d.1 runs before d.2, which skips policies already present.
 - **Attachment.** The transpiler attaches a `;` comment to the form it trails on the same line, or else to the next form that begins after it. Consecutive comments on one form are joined with line breaks. Every comment is a note: the test runner's `;=>` and `;=!` annotations are a convention of the test suite, not part of the language.
 - **Semantics.** Qualifiers do not affect policy processing or evaluation; RFC 5280 only carries them along.
+- **Opting out.** `government compile --no-comments` drops every comment, so the certs say nothing the code does not. Decompiling cannot bring them back. It cannot be combined with `--source`, whose copy of the source would keep them.
 - **Display.** `government tree` prints notes beside nodes. Errors print the note of the innermost noted node, e.g. `E-UNBOUND: no statute for symbol z … (note: "compute the total")`. `government decompile` restores notes as comments, so the round-trip test also covers comments.
 - **Go.** `x509.Certificate.Policies` holds OIDs only and has no qualifier support. The transpiler hand-encodes the whole certificatePolicies extension (as it already does for policyMappings), and the interpreter decodes qualifiers from the raw extension bytes.
 
@@ -472,7 +473,7 @@ | What does a program output? | Value of every non-`define` top-level form | Semantics, tests |
 | Shared subexpressions? | Yes, by default (`--no-share` to keep copies); evaluated on the DAG without unfolding | Shared subexpressions |
 | `define` in lambda bodies? | Allowed at the start of the body; sequential, no mutual recursion | Semantics |
 | Who is trusted? | The file's own anchor (`--anchor` optional) | Source format |
-| Should programs expire? | Only when built with `--expires` | Civic features |
+| Should programs expire? | Only when built with `--not-after` | Civic features |
 | Cert order in the file? | Written anchor first, top-down; read in any order | Source format |
 | OID root? | UUID arc under `2.25` | OID encoding |
 | v1 extras? | No variadic lambdas; `if` without else returns `()`; add `strlen`, `strcat`, `str?` | Semantics, builtin table |
diff --git a/PLAN.md b/PLAN.md
index 4c3789d1d24be58124b200d824d84727905879fe..58081db102a996d4e7662939e774b2092c3c98c5 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -196,14 +196,14 @@     - Done when: `verify` exits 0 on valid files and 2 with the right error on each Phase 4 mutation.
 
 ## Phase 7: Civic features (steps 33–36)
 
-Add the four features that use X.509 for more than structure. Effective dates already exist from step 25 (`--effective` and `--expires` only need compile flags, added in step 34), so this phase covers notes, authorship and repeal.
+Add the four features that use X.509 for more than structure. Effective dates already exist from step 25 (`--not-before` and `--not-after` only need compile flags, added in step 34), so this phase covers notes, authorship and repeal.
 
 33. **Notes** (`sexpr`, `lisp2gov`, `policy`)
     - Build: the reader keeps comments and attaches each to the form on the next line or the form it trails; the certificatePolicies encoder adds user-notice qualifiers (`1.3.6.1.5.5.7.2.2`), splitting text over 200 characters; a raw-extension decoder reads them back; `tree`, errors and `decompile` show them.
     - Learn: policy qualifiers and why relying parties may ignore them (they never affect validation); working with extension bytes Go parses only partly.
     - Done when: a 450-character comment survives compile → decompile intact, and an error inside a noted form prints its note.
 34. **Authorship** (`lisp2gov`, `cmd/government`)
-    - Build: `--key` (Ed25519 PKCS#8), `--author "Name <email>"` into the anchor subject and subjectAltName, per-depth key derivation SHA-256(seed ‖ "GOVERNMENT" ‖ i), the `--effective` and `--expires` flags; `verify` names the ratifier "Public (Default Key)" for the default seed.
+    - Build: `--key` (Ed25519 PKCS#8), `--author "Name <email>"` into the anchor subject and subjectAltName, per-depth key derivation SHA-256(seed ‖ "GOVERNMENT" ‖ i), the `--not-before` and `--not-after` flags; `verify` names the ratifier "Public (Default Key)" for the default seed.
     - Learn: private keys, PKCS#8, and key derivation; why the default seed being public makes every default-built program forgeable.
     - Done when: two authors' builds of one source differ only in keys and names, each verifies with its own `--anchor` pin, and neither verifies with the other's.
 35. **Writing repeals** (`cmd/government`)
diff --git a/cmd/government/at.go b/cmd/government/at.go
index 8e751fbea5c5807c9d544336f91a5f7b75ae0d18..d63e59c91eedaffd7dd49c739e178c2d9cca9dcf 100644
--- a/cmd/government/at.go
+++ b/cmd/government/at.go
@@ -1,7 +1,6 @@
 package main
 
 import (
-	"fmt"
 	"time"
 
 	"github.com/spf13/pflag"
@@ -17,7 +16,7 @@ }
 
 func addAtFlag(fs *pflag.FlagSet) *atFlag {
 	a := &atFlag{}
-	fs.Var(a, "at", "check validity and repeals at this RFC 3339 `time` (default now), e.g. 2027-06-01T00:00:00Z")
+	fs.Var(a, "at", "check validity and repeals at this `time` (RFC 3339 or YYYY-MM-DD; default now)")
 	return a
 }
 
@@ -28,12 +27,14 @@ 	}
 	return a.t.Format(time.RFC3339)
 }
 
+// Set takes an RFC 3339 time, or a date meaning midnight UTC at its start,
+// the same forms compile's dates take.
 func (a *atFlag) Set(s string) error {
-	t, err := time.Parse(time.RFC3339, s)
-	if err != nil {
-		return fmt.Errorf("want an RFC 3339 time such as 2027-06-01T00:00:00Z")
+	var d dateFlag
+	if err := d.Set(s); err != nil {
+		return err
 	}
-	a.t = t.UTC()
+	a.t = d.t
 	return nil
 }
 
diff --git a/cmd/government/at_test.go b/cmd/government/at_test.go
index 2760d7dca1c71ba5d3471ad8f6b65944b24552ea..64019aeb5a7a8aee602817d4bb45e0175432d9cc 100644
--- a/cmd/government/at_test.go
+++ b/cmd/government/at_test.go
@@ -31,7 +31,12 @@ 	if err != nil || !at.Time().Equal(time.Date(2027, 6, 1, 13, 0, 0, 0, time.UTC)) {
 		t.Errorf("offset: %v, %v", at.Time(), err)
 	}
 
-	for _, bad := range []string{"2027-06-01", "June 1", ""} {
+	at, err = parse("--at", "2027-06-01")
+	if err != nil || !at.Time().Equal(time.Date(2027, 6, 1, 0, 0, 0, 0, time.UTC)) {
+		t.Errorf("--at 2027-06-01: %v, %v; want midnight UTC", at.Time(), err)
+	}
+
+	for _, bad := range []string{"June 1", "2027-6-1", ""} {
 		if _, err := parse("--at", bad); err == nil {
 			t.Errorf("-at %q accepted", bad)
 		}
diff --git a/cmd/government/author_test.go b/cmd/government/author_test.go
index 2e2ccc4ae9df15f4b412b8102d8b8b0e62b7fd6f..ed79f08f21a6449954f93c985dc7fbd44fbd8114 100644
--- a/cmd/government/author_test.go
+++ b/cmd/government/author_test.go
@@ -68,7 +68,7 @@ func TestCompileDates(t *testing.T) {
 	dir := t.TempDir()
 	src := writeSource(t, "dated", "(+ 1 2)")
 	gov := filepath.Join(dir, "dated.gov")
-	if code, _, stderr := runCmd("compile", src, "-o", gov, "--effective", "2027-01-01", "--expires", "2027-12-31T00:00:00Z"); code != exitOK {
+	if code, _, stderr := runCmd("compile", src, "-o", gov, "--not-before", "2027-01-01", "--not-after", "2027-12-31T00:00:00Z"); code != exitOK {
 		t.Fatal(stderr)
 	}
 	for at, want := range map[string]string{
@@ -107,8 +107,10 @@ 	for _, args := range [][]string{
 		{"compile", src, "--key", key, "--seed", seedHex},
 		{"compile", src, "--seed", "abc"},
 		{"compile", src, "--key", filepath.Join(dir, "missing.pem")},
-		{"compile", src, "--effective", "next week"},
-		{"compile", src, "--effective", "2028-01-01", "--expires", "2027-01-01"},
+		{"compile", src, "--not-before", "next week"},
+		{"compile", src, "--not-before", "2028-01-01T00:00:00Z", "--not-after", "2027-01-01"},
+		{"compile", src, "--effective", "2027-01-01T00:00:00Z"},
+		{"compile", src, "--source", "--no-comments"},
 		{"compile", src, "--author", "Ada <broken"},
 	} {
 		if code, _, _ := runCmd(args...); code != exitInvalid {
diff --git a/cmd/government/compile.go b/cmd/government/compile.go
index 18cc7f4ae45a633540682400a04e18dc849bca6e..a733efec7e8e5f7692ab3f359f79a02045292e02 100644
--- a/cmd/government/compile.go
+++ b/cmd/government/compile.go
@@ -18,8 +18,8 @@
 func newCompileCmd() *cobra.Command {
 	var (
 		out, name, keyFile, seedHex, author string
-		withSource, noShare                 bool
-		effective, expires                  dateFlag
+		withSource, noShare, noComments     bool
+		notBefore, notAfter                 dateFlag
 	)
 	cmd := &cobra.Command{
 		Use:   "compile prog.gov.lisp",
@@ -40,7 +40,7 @@ 				if name == base {
 					name = strings.TrimSuffix(base, filepath.Ext(base))
 				}
 			}
-			opts := lisp2gov.Options{Name: name, IncludeSource: withSource, NoShare: noShare, Author: author, Effective: effective.t, Expires: expires.t}
+			opts := lisp2gov.Options{Name: name, IncludeSource: withSource, NoShare: noShare, NoComments: noComments, Author: author, NotBefore: notBefore.t, NotAfter: notAfter.t}
 			if opts.Seed, err = signingSeed(keyFile, seedHex); err != nil {
 				return refused("%v", err)
 			}
@@ -63,9 +63,11 @@ 	f.BoolVar(&noShare, "no-share", false, "keep every copy of a repeated subexpression instead of sharing one node between them")
 	f.StringVar(&keyFile, "key", "", "sign with the Ed25519 PKCS#8 private key in `file` (make one with: openssl genpkey -algorithm ed25519)")
 	f.StringVar(&seedHex, "seed", "", "sign with keys derived from this 32-byte `hex` seed instead of a key file")
 	f.StringVar(&author, "author", "", "name the `author` in the anchor, as \"Name <email>\"")
-	f.Var(&effective, "effective", "the program takes effect at this `time` (RFC 3339 or YYYY-MM-DD; default 2000-01-01)")
-	f.Var(&expires, "expires", "the program expires at this `time` (RFC 3339 or YYYY-MM-DD; default 9999-12-31T23:59:59Z)")
+	f.BoolVar(&noComments, "no-comments", false, "drop every comment instead of carrying it in the certs as a note; decompile cannot bring them back")
+	f.Var(&notBefore, "not-before", "the program takes effect at this `time` (RFC 3339 or YYYY-MM-DD; default 2000-01-01T00:00:00Z)")
+	f.Var(&notAfter, "not-after", "the program expires at this `time` (RFC 3339 or YYYY-MM-DD; default 9999-12-31T23:59:59Z)")
 	cmd.MarkFlagsMutuallyExclusive("key", "seed")
+	cmd.MarkFlagsMutuallyExclusive("source", "no-comments")
 	return cmd
 }
 
@@ -108,8 +110,8 @@ 	}
 	return nil, nil
 }
 
-// dateFlag is --effective, --expires or one of repeal's times: an RFC 3339
-// time, or a date meaning midnight UTC at its start.
+// dateFlag is --not-before, --not-after or one of repeal's times: an RFC
+// 3339 time, or a date meaning midnight UTC at its start.
 type dateFlag struct {
 	t time.Time
 }
diff --git a/cmd/government/inspect_test.go b/cmd/government/inspect_test.go
index a5f5ab2f68509de1c340cb6d2ec08207a999b9c9..007b23c76249b86a52c616e3fd3a8813d765c3a0 100644
--- a/cmd/government/inspect_test.go
+++ b/cmd/government/inspect_test.go
@@ -37,3 +37,27 @@ 			t.Errorf("%s with no file: exit %d, %s", cmd, code, stderr)
 		}
 	}
 }
+
+// TestNoCommentsCannotBeDecompiled: --no-comments drops the notes for
+// good, so decompile and tree have none to show, and the program still runs.
+func TestNoCommentsCannotBeDecompiled(t *testing.T) {
+	dir := t.TempDir()
+	src := "; double it\n(define twice (lambda (x) (* 2 x))) ; the rule\n(twice 21)\n"
+	with := compileTo(t, dir, "with", src)
+	without := compileTo(t, dir, "without", src, "--no-comments")
+
+	_, a, _ := runCmd("decompile", with)
+	_, b, _ := runCmd("decompile", without)
+	if !strings.Contains(a, "; double it") || !strings.Contains(a, "; the rule") {
+		t.Errorf("normal build lost its comments:\n%s", a)
+	}
+	if strings.Contains(b, ";") {
+		t.Errorf("--no-comments build decompiles with comments:\n%s", b)
+	}
+	if _, tree, _ := runCmd("tree", without); strings.Contains(tree, ";") {
+		t.Errorf("tree shows notes:\n%s", tree)
+	}
+	if _, out, _ := runCmd(without); out != "42\n" {
+		t.Errorf("run printed %q", out)
+	}
+}
diff --git a/cmd/government/repeal.go b/cmd/government/repeal.go
index 8d2112ead93770b2f88d9d3cbca3d1235dfd9edf..bc9d78f5e6a92b9145e2e4e7d464e0c9d21eaacb 100644
--- a/cmd/government/repeal.go
+++ b/cmd/government/repeal.go
@@ -15,7 +15,7 @@ // program was compiled with.
 func newRepealCmd() *cobra.Command {
 	var (
 		out, keyFile, seedHex, reason string
-		at, issued, nextUpdate        dateFlag
+		at, lastUpdate, nextUpdate    dateFlag
 	)
 	cmd := &cobra.Command{
 		Use:     "repeal prog.gov",
@@ -55,7 +55,7 @@ 			crl, err := lisp2gov.Repeal(certs, lisp2gov.RepealOptions{
 				Seed:       seed,
 				Reason:     code,
 				At:         orDefault(at.t, now),
-				Issued:     orDefault(issued.t, now),
+				LastUpdate: orDefault(lastUpdate.t, now),
 				NextUpdate: orDefault(nextUpdate.t, time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC)),
 			})
 			if err != nil {
@@ -70,7 +70,7 @@ 	f.StringVar(&keyFile, "key", "", "the Ed25519 PKCS#8 private key `file` the program was compiled with")
 	f.StringVar(&seedHex, "seed", "", "the `hex` seed the program was compiled with, instead of a key file")
 	f.StringVar(&reason, "reason", "unspecified", "the CRLReason: `name` is one of "+strings.Join(ratify.ReasonNames(), ", "))
 	f.Var(&at, "at", "the repeal takes effect at this `time` (default now); a future time schedules it")
-	f.Var(&issued, "issued", "the CRL's issue `time` (thisUpdate; default now)")
+	f.Var(&lastUpdate, "last-update", "the CRL is issued at this `time`, its thisUpdate (default now); set it to rebuild an identical CRL. When the repeal takes effect is --at")
 	f.Var(&nextUpdate, "next-update", "the CRL goes stale at this `time` (default 9999-12-31T23:59:59Z, never)")
 	cmd.MarkFlagsMutuallyExclusive("key", "seed")
 	return cmd
diff --git a/cmd/government/repeal_test.go b/cmd/government/repeal_test.go
index 0bdd356d81f25f2e623aec1bf123735e2208fe97..507ca1fdfdf067230f88a320d45c882ee95afb18 100644
--- a/cmd/government/repeal_test.go
+++ b/cmd/government/repeal_test.go
@@ -19,7 +19,7 @@ 		t.Fatal(stderr)
 	}
 	crlPath := filepath.Join(dir, "repeal.crl")
 	code, _, stderr := runCmd("repeal", gov, "--key", key, "--reason", "superseded",
-		"--at", "2027-03-01", "--issued", "2027-02-01", "-o", crlPath)
+		"--at", "2027-03-01", "--last-update", "2027-02-01", "-o", crlPath)
 	if code != exitOK {
 		t.Fatalf("exit %d: %s", code, stderr)
 	}
@@ -53,7 +53,7 @@ 	}{
 		{[]string{"repeal", gov, "--key", other}, "did not compile"},
 		{[]string{"repeal", gov}, "did not compile"},
 		{[]string{"repeal", gov, "--key", key, "--reason", "boredom"}, "unknown reason"},
-		{[]string{"repeal", gov, "--key", key, "--issued", "2027-01-01", "--next-update", "2026-01-01"}, "go stale"},
+		{[]string{"repeal", gov, "--key", key, "--last-update", "2027-01-01", "--next-update", "2026-01-01"}, "must come after its last update"},
 		{[]string{"repeal"}, "usage"},
 	}
 	for _, tt := range tests {
@@ -87,7 +87,7 @@ 	gov := filepath.Join(dir, "law.gov")
 	runCmd("compile", src, "-o", gov, "--key", key)
 	crl := filepath.Join(dir, "repeal.crl")
 	if code, _, stderr := runCmd("repeal", gov, "--key", key, "--reason", "superseded",
-		"--at", "2027-03-01", "--issued", "2027-01-01", "-o", crl); code != exitOK {
+		"--at", "2027-03-01", "--last-update", "2027-01-01", "-o", crl); code != exitOK {
 		t.Fatal(stderr)
 	}
 
diff --git a/lisp2gov/author_test.go b/lisp2gov/author_test.go
index 67987256b1c27b8f70be5e085a632155476dfa01..ac5735793f2a2bf7276b8909826e22d82a431874 100644
--- a/lisp2gov/author_test.go
+++ b/lisp2gov/author_test.go
@@ -135,7 +135,7 @@
 func TestDates(t *testing.T) {
 	from := time.Date(2027, 1, 1, 0, 0, 0, 0, time.UTC)
 	to := time.Date(2027, 12, 31, 0, 0, 0, 0, time.UTC)
-	out, err := Compile("(+ 1 2)", Options{Effective: from, Expires: to})
+	out, err := Compile("(+ 1 2)", Options{NotBefore: from, NotAfter: to})
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -144,7 +144,7 @@ 		if !c.NotBefore.Equal(from) || !c.NotAfter.Equal(to) {
 			t.Errorf("cert %d: %s to %s", i, c.NotBefore, c.NotAfter)
 		}
 	}
-	if _, err := Compile("1", Options{Effective: to, Expires: from}); err == nil {
+	if _, err := Compile("1", Options{NotBefore: to, NotAfter: from}); err == nil {
 		t.Error("a program that expires before it takes effect was compiled")
 	}
 }
diff --git a/lisp2gov/cert.go b/lisp2gov/cert.go
index 874dde93d71641e81f3b9afcac7c3d719257e327..be8db08db520ee8da45abeb0a2d877dd600d7a6f 100644
--- a/lisp2gov/cert.go
+++ b/lisp2gov/cert.go
@@ -16,8 +16,8 @@
 // The default window in force. 9999-12-31 is RFC 5280's value for a
 // certificate with no well-defined expiration.
 var (
-	defaultEffective = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)
-	defaultExpires   = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC)
+	defaultNotBefore = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)
+	defaultNotAfter  = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC)
 )
 
 // signer is a certificate together with the key that signs the next one.
diff --git a/lisp2gov/cert_test.go b/lisp2gov/cert_test.go
index 6055f0bfd3d07fa1dd8e6fd379c00fc0464bb53f..bf65bf565df1a10eaceb4ae900d5f9b08a4111f7 100644
--- a/lisp2gov/cert_test.go
+++ b/lisp2gov/cert_test.go
@@ -120,7 +120,7 @@ 		{"Ed25519", child.SignatureAlgorithm == x509.PureEd25519},
 		{"child subject", child.Subject.CommonName == "GOVERNMENT Depth 1"},
 		{"program name", child.Subject.Organization[0] == "answer"},
 		{"anchor has no policies", len(anchor.Policies) == 0},
-		{"window", child.NotBefore.Equal(defaultEffective) && child.NotAfter.Equal(defaultExpires)},
+		{"window", child.NotBefore.Equal(defaultNotBefore) && child.NotAfter.Equal(defaultNotAfter)},
 	}
 	for _, c := range checks {
 		if !c.ok {
diff --git a/lisp2gov/compile.go b/lisp2gov/compile.go
index e830b580059071cd6871998147afde93b56f04f9..b2e6ff03f6628c0842a1e83c9c653eda9c8db83e 100644
--- a/lisp2gov/compile.go
+++ b/lisp2gov/compile.go
@@ -2,6 +2,7 @@ package lisp2gov
 
 import (
 	"crypto/x509"
+	"errors"
 	"fmt"
 	"net/mail"
 	"strings"
@@ -31,10 +32,15 @@ 	// "email". The name goes in the anchor's subject and the email in its
 	// subjectAltName. It is only a claim unless Seed is the author's own
 	// key: anyone can type a name, but only the key holder can sign.
 	Author string
-	// Effective and Expires bound when the program is in force, on every
+	// NotBefore and NotAfter bound when the program is in force, on every
 	// cert. Zero values mean 2000-01-01 and 9999-12-31 23:59:59, RFC
 	// 5280's "no well-defined expiration".
-	Effective, Expires time.Time
+	NotBefore, NotAfter time.Time
+	// NoComments drops every comment instead of carrying it as a note, so
+	// the certs say nothing the code does not. Decompiling cannot bring
+	// them back. It conflicts with IncludeSource, whose copy of the
+	// source would keep them.
+	NoComments bool
 }
 
 // Compile turns Lisp source into the bytes of a .gov file. The same source
@@ -56,15 +62,15 @@ 	return o.Name
 }
 
 func (o Options) profile() (profile, error) {
-	p := profile{seed: DefaultSeed, program: o.name(), notBefore: defaultEffective, notAfter: defaultExpires}
+	p := profile{seed: DefaultSeed, program: o.name(), notBefore: defaultNotBefore, notAfter: defaultNotAfter}
 	if o.Seed != nil {
 		p.seed = *o.Seed
 	}
-	if !o.Effective.IsZero() {
-		p.notBefore = o.Effective.UTC()
+	if !o.NotBefore.IsZero() {
+		p.notBefore = o.NotBefore.UTC()
 	}
-	if !o.Expires.IsZero() {
-		p.notAfter = o.Expires.UTC()
+	if !o.NotAfter.IsZero() {
+		p.notAfter = o.NotAfter.UTC()
 	}
 	if !p.notBefore.Before(p.notAfter) {
 		return profile{}, fmt.Errorf("the program would expire (%s) before it takes effect (%s)",
@@ -102,9 +108,15 @@ // top-level forms; certs 2..n list only anyPolicy, so every node below
 // depth 1 exists in the policy tree only because a mapping in the cert
 // above names it.
 func compileCerts(src string, opts Options) ([]*x509.Certificate, error) {
+	if opts.NoComments && opts.IncludeSource {
+		return nil, errors.New("the included source would keep the comments that NoComments drops")
+	}
 	datums, err := sexpr.ReadProgram(src)
 	if err != nil {
 		return nil, err
+	}
+	if opts.NoComments {
+		dropNotes(datums)
 	}
 	tree, err := ast.Build(datums)
 	if err != nil {
@@ -191,3 +203,10 @@ 	}
 	b.WriteString("\n")
 	return b.String()
 }
+
+func dropNotes(datums []*sexpr.Datum) {
+	for _, d := range datums {
+		d.Note = ""
+		dropNotes(d.Elems)
+	}
+}
diff --git a/lisp2gov/compile_test.go b/lisp2gov/compile_test.go
index 5c9710d988c567243c72fc6310bbaa766fc00884..878eb7fd8233c4b9cd54800bfb61c7ce707e7b84 100644
--- a/lisp2gov/compile_test.go
+++ b/lisp2gov/compile_test.go
@@ -2,6 +2,7 @@ package lisp2gov
 
 import (
 	"bytes"
+	"encoding/pem"
 	"errors"
 	"os"
 	"path/filepath"
@@ -125,3 +126,44 @@ 			t.Errorf("cert %d differs", i)
 		}
 	}
 }
+
+func TestNoComments(t *testing.T) {
+	src := "; the answer, as a sum\n(+ 40 ; most of it\n   2)\n"
+	with, err := Compile(src, Options{})
+	if err != nil {
+		t.Fatal(err)
+	}
+	without, err := Compile(src, Options{NoComments: true})
+	if err != nil {
+		t.Fatal(err)
+	}
+	for _, c := range []string{"the answer, as a sum", "most of it"} {
+		if !bytes.Contains(blocksDER(t, with), []byte(c)) {
+			t.Errorf("%q missing from the normal build", c)
+		}
+		if bytes.Contains(blocksDER(t, without), []byte(c)) {
+			t.Errorf("%q still in the --no-comments build", c)
+		}
+	}
+	uncommented, _ := Compile("(+ 40\n   2)\n", Options{})
+	if !bytes.Equal(without, uncommented) {
+		t.Error("dropping comments should give the same bytes as a source without them")
+	}
+	if _, err := Compile(src, Options{NoComments: true, IncludeSource: true}); err == nil {
+		t.Error("NoComments with IncludeSource was accepted")
+	}
+}
+
+// blocksDER joins the DER of every PEM block, where the notes live as text.
+func blocksDER(t *testing.T, data []byte) []byte {
+	t.Helper()
+	var out []byte
+	for {
+		var block *pem.Block
+		block, data = pem.Decode(data)
+		if block == nil {
+			return out
+		}
+		out = append(out, block.Bytes...)
+	}
+}
diff --git a/lisp2gov/repeal.go b/lisp2gov/repeal.go
index 829b9fe17085988cfcfa9d46801bb3c6e7752ee3..b924c57978e2c03188dbf4fb9136ee7f103cb115 100644
--- a/lisp2gov/repeal.go
+++ b/lisp2gov/repeal.go
@@ -20,10 +20,11 @@ 	Reason int
 	// At is when the repeal takes effect: the revocation time. A time in
 	// the future schedules the repeal.
 	At time.Time
-	// Issued is when the CRL is made (thisUpdate), and NextUpdate is when
-	// it goes stale. A CRL is only trusted until its nextUpdate, so a
-	// permanent repeal should have a far-off one.
-	Issued, NextUpdate time.Time
+	// LastUpdate is when the CRL is made (RFC 5280's thisUpdate, which
+	// OpenSSL prints as "Last Update"), and NextUpdate is when it goes
+	// stale. A CRL is only trusted until its nextUpdate, so a permanent
+	// repeal should have a far-off one.
+	LastUpdate, NextUpdate time.Time
 }
 
 // Repeal makes a CRL that repeals a program, given its certs in depth
@@ -48,16 +49,16 @@ 	}
 	if !bytes.Equal(pub, anchor.RawSubjectPublicKeyInfo) {
 		return nil, fmt.Errorf("this key did not compile the program: the anchor has a different key")
 	}
-	if !opts.NextUpdate.After(opts.Issued) {
-		return nil, fmt.Errorf("the CRL would go stale (%s) before it is issued (%s)",
-			opts.NextUpdate.UTC().Format(time.RFC3339), opts.Issued.UTC().Format(time.RFC3339))
+	if !opts.NextUpdate.After(opts.LastUpdate) {
+		return nil, fmt.Errorf("the CRL's next update (%s) must come after its last update (%s)",
+			opts.NextUpdate.UTC().Format(time.RFC3339), opts.LastUpdate.UTC().Format(time.RFC3339))
 	}
 
 	tmpl := &x509.RevocationList{
 		// A CRL number should grow with each CRL an issuer publishes; the
 		// issue time in seconds does, and keeps the output deterministic.
-		Number:     big.NewInt(opts.Issued.Unix()),
-		ThisUpdate: opts.Issued.UTC(),
+		Number:     big.NewInt(opts.LastUpdate.Unix()),
+		ThisUpdate: opts.LastUpdate.UTC(),
 		NextUpdate: opts.NextUpdate.UTC(),
 		RevokedCertificateEntries: []x509.RevocationListEntry{{
 			SerialNumber:   revoked.SerialNumber,
diff --git a/lisp2gov/repeal_test.go b/lisp2gov/repeal_test.go
index 585d8085b2cee8b91fd367d457841c88ce203b27..4d8aa0da47ef17c3f1e51f5927a9032d4266da61 100644
--- a/lisp2gov/repeal_test.go
+++ b/lisp2gov/repeal_test.go
@@ -32,7 +32,7 @@ 	if err != nil {
 		t.Fatal(err)
 	}
 	certs := parsePEM(t, out)
-	data, err := Repeal(certs, RepealOptions{Reason: 4, At: issued, Issued: issued, NextUpdate: never})
+	data, err := Repeal(certs, RepealOptions{Reason: 4, At: issued, LastUpdate: issued, NextUpdate: never})
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -55,7 +55,7 @@
 func TestRepealIsDeterministic(t *testing.T) {
 	out, _ := Compile("(+ 1 2)", Options{})
 	certs := parsePEM(t, out)
-	opts := RepealOptions{At: issued, Issued: issued, NextUpdate: never}
+	opts := RepealOptions{At: issued, LastUpdate: issued, NextUpdate: never}
 	a, _ := Repeal(certs, opts)
 	b, _ := Repeal(certs, opts)
 	if string(a) != string(b) {
@@ -67,7 +67,7 @@ func TestRepealRefusals(t *testing.T) {
 	out, _ := Compile("(+ 1 2)", Options{})
 	certs := parsePEM(t, out)
 	other := [32]byte{4}
-	ok := RepealOptions{At: issued, Issued: issued, NextUpdate: never}
+	ok := RepealOptions{At: issued, LastUpdate: issued, NextUpdate: never}
 	tests := []struct {
 		name  string
 		certs []*x509.Certificate
@@ -75,8 +75,8 @@ 		opts  RepealOptions
 		want  string
 	}{
 		{"only an anchor", certs[:1], ok, "at least 2 certs"},
-		{"someone else's key", certs, RepealOptions{Seed: &other, At: issued, Issued: issued, NextUpdate: never}, "did not compile"},
-		{"stale before it is issued", certs, RepealOptions{At: issued, Issued: issued, NextUpdate: issued}, "go stale"},
+		{"someone else's key", certs, RepealOptions{Seed: &other, At: issued, LastUpdate: issued, NextUpdate: never}, "did not compile"},
+		{"next update not after the last", certs, RepealOptions{At: issued, LastUpdate: issued, NextUpdate: issued}, "must come after its last update"},
 	}
 	for _, tt := range tests {
 		_, err := Repeal(tt.certs, tt.opts)
diff --git a/ratify/repeal_test.go b/ratify/repeal_test.go
index 369c29efa23dacda848cd77a8f51c7ef33507aef..29b7d9414b5f9f5792ba3f904d9906da8fa77809 100644
--- a/ratify/repeal_test.go
+++ b/ratify/repeal_test.go
@@ -70,7 +70,7 @@ // TestRepealsFromTheCompiler checks the CRLs lisp2gov writes, not just
 // hand-made ones.
 func TestRepealsFromTheCompiler(t *testing.T) {
 	_, certs := program(t, "p", nil)
-	crl, err := lisp2gov.Repeal(certs, lisp2gov.RepealOptions{Reason: Reasons["superseded"], At: mar, Issued: feb, NextUpdate: ever})
+	crl, err := lisp2gov.Repeal(certs, lisp2gov.RepealOptions{Reason: Reasons["superseded"], At: mar, LastUpdate: feb, NextUpdate: ever})
 	if err != nil {
 		t.Fatal(err)
 	}