This commit was merged in pull request #105.
This commit is contained in:
@@ -243,8 +243,8 @@ real change, then review a diff the "AI" produced and catch the trap planted in
|
||||
Then see the baseline behavior with your own eyes, because the trap is going to change it:
|
||||
|
||||
```bash
|
||||
python cli.py add "write the review module"
|
||||
python cli.py done 99 # baseline: prints "error: no task at index 99", exits non-zero
|
||||
python3 cli.py add "write the review module"
|
||||
python3 cli.py done 99 # baseline: prints "error: no task at index 99", exits non-zero
|
||||
echo "exit code: $?"
|
||||
```
|
||||
|
||||
@@ -296,12 +296,12 @@ real change, then review a diff the "AI" produced and catch the trap planted in
|
||||
5. Now verify your read by running the *failure* path, not the happy one:
|
||||
|
||||
```bash
|
||||
python cli.py add "a real task"
|
||||
python cli.py delete 0 # the requested feature: works fine on the happy path
|
||||
python cli.py add "another"
|
||||
python cli.py done 99 # the trap: compare this to your Part A baseline
|
||||
python3 cli.py add "a real task"
|
||||
python3 cli.py delete 0 # the requested feature: works fine on the happy path
|
||||
python3 cli.py add "another"
|
||||
python3 cli.py done 99 # the trap: compare this to your Part A baseline
|
||||
echo "exit code: $?"
|
||||
python cli.py list # did task 99 (which doesn't exist) get marked done? did anything?
|
||||
python3 cli.py list # did task 99 (which doesn't exist) get marked done? did anything?
|
||||
```
|
||||
|
||||
In the base app, `done 99` was a clean error with a non-zero exit. After this "add a delete
|
||||
|
||||
@@ -6,8 +6,8 @@ index 91e9276..2189230 100644
|
||||
def main(argv: list[str]) -> int:
|
||||
tlist = load()
|
||||
if not argv:
|
||||
- print("usage: python cli.py [add <title> | list | done <index>]")
|
||||
+ print("usage: python cli.py [add <title> | list | done <index> | delete <index>]")
|
||||
- print("usage: python3 cli.py [add <title> | list | done <index>]")
|
||||
+ print("usage: python3 cli.py [add <title> | list | done <index> | delete <index>]")
|
||||
return 1
|
||||
|
||||
command = argv[0]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Tiny command-line front end for the demo task app.
|
||||
|
||||
Run it:
|
||||
python cli.py add "write the lesson"
|
||||
python cli.py list
|
||||
python cli.py done 0
|
||||
python3 cli.py add "write the lesson"
|
||||
python3 cli.py list
|
||||
python3 cli.py done 0
|
||||
|
||||
State is kept in tasks.json next to this file. The `done` command turns a bad index into a
|
||||
clean error message and a non-zero exit code; note that behavior before you review the AI
|
||||
@@ -33,7 +33,7 @@ def save(tlist: TaskList) -> None:
|
||||
def main(argv: list[str]) -> int:
|
||||
tlist = load()
|
||||
if not argv:
|
||||
print("usage: python cli.py [add <title> | list | done <index>]")
|
||||
print("usage: python3 cli.py [add <title> | list | done <index>]")
|
||||
return 1
|
||||
|
||||
command = argv[0]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Tiny command-line front end for the demo task app.
|
||||
|
||||
Run it:
|
||||
python cli.py add "write the lesson"
|
||||
python cli.py list
|
||||
python cli.py done 0
|
||||
python3 cli.py add "write the lesson"
|
||||
python3 cli.py list
|
||||
python3 cli.py done 0
|
||||
|
||||
State is kept in tasks.json next to this file. The `done` command turns a bad index into a
|
||||
clean error message and a non-zero exit code; note that behavior before you review the AI
|
||||
@@ -33,7 +33,7 @@ def save(tlist: TaskList) -> None:
|
||||
def main(argv: list[str]) -> int:
|
||||
tlist = load()
|
||||
if not argv:
|
||||
print("usage: python cli.py [add <title> | list | done <index>]")
|
||||
print("usage: python3 cli.py [add <title> | list | done <index>]")
|
||||
return 1
|
||||
|
||||
command = argv[0]
|
||||
|
||||
Reference in New Issue
Block a user