Yo yo yo, back at it again with another issue, again on self.commit.
Got the clanker to generate a summary again, but I believe I've fixed
the issue - raised a correlated PR regarding it (which you can find
#36).
Basically it seems the auth tests are using the current application
instance instead of making up a one for the test. This causes the
test to fail and, in turn, self.commit to fail.
While my PR does fix the issue in one specific test, I think the
suggestion to harden the overall ASDF suite to use a disposable worker
is a nice idea - more below.
Summary
self.commit cannot publish a tested active-image mutation. Two
identical self.commit attempts failed with Conversation 52X6kxF does not exist. The mutation remains installed and effective but
pending, so the private image commit is not created or selected.
Environment
- Autolith repository:
/home/oreo/.local/src/autolith
- Commit:
775f7de Keep non-error conditions from killing the image
- OS: Linux 7.1.8-arch1-3, x86-64
- SBCL: 2.6.6
- Autolith private image before the attempt: base, synchronized, no
pending mutations
Steps to reproduce
-
Start from a synchronized base private image.
-
Define a function through self.redefine, for example:
(defun string-whitespace-p (string)
"Return T when STRING contains only Common Lisp whitespace characters."
(every (lambda (character)
(member character '(#\Space #\Tab #\Newline #\Return #\Page)))
string))
-
Verify the mutation with self.exercise or evaluate it
directly. The function returned T, T, and NIL for
whitespace-only, empty, and non-whitespace inputs respectively.
-
Run self.commit with the title Add whitespace string predicate.
-
Observe the failure:
Conversation 52X6kxF does not exist.
-
Retry the same self.commit call. It fails with the same message.
Suggested Fix
The failure is caused by a test that is not isolated from the running
application. self.commit invokes asdf:test-system :autolith in the
active image. During
test-openai-compatible-provider-bare-auth-selection, the line
regarding main-dispatch '("auth") reaches
main--connect-application. Because *active-application* is the
live application, it calls application-reconnect instead of creating
a test application.
The test replaces configuration-create with a temporary test
configuration, but the retained live application contains conversation
52X6kxF. application-reconnect consequently attempts to load that
identifier from the temporary configuration and signals Conversation 52X6kxF does not exist.
The smallest fix is to dynamically bind *active-application* to
nil around the test's main-dispatch call. That makes
main--connect-application construct a new application using the test
configuration. The dynamic binding restores the real application after
the test, so the test cannot replace or reconnect the active user
session.
A broader hardening change would run self.commit's full ASDF suite
in a disposable worker or subprocess. That isolates all tests from the
active agent's global state. The focused test fix should be applied
first because the test currently violates isolation even when invoked
by other in-process checks.
Add a regression case that runs the auth-selection test while a
distinct persisted application is dynamically active, then verifies
the test completes without loading that application's conversation
from the temporary test configuration.
Yo yo yo, back at it again with another issue, again on
self.commit.Got the clanker to generate a summary again, but I believe I've fixed
the issue - raised a correlated PR regarding it (which you can find
#36).
Basically it seems the auth tests are using the current application
instance instead of making up a one for the test. This causes the
test to fail and, in turn,
self.committo fail.While my PR does fix the issue in one specific test, I think the
suggestion to harden the overall ASDF suite to use a disposable worker
is a nice idea - more below.
Summary
self.commitcannot publish a tested active-image mutation. Twoidentical
self.commitattempts failed withConversation 52X6kxF does not exist. The mutation remains installed and effective butpending, so the private image commit is not created or selected.
Environment
/home/oreo/.local/src/autolith775f7de Keep non-error conditions from killing the imagepending mutations
Steps to reproduce
Start from a synchronized base private image.
Define a function through
self.redefine, for example:Verify the mutation with
self.exerciseor evaluate itdirectly. The function returned
T,T, andNILforwhitespace-only, empty, and non-whitespace inputs respectively.
Run
self.commitwith the titleAdd whitespace string predicate.Observe the failure:
Retry the same
self.commitcall. It fails with the same message.Suggested Fix
The failure is caused by a test that is not isolated from the running
application.
self.commitinvokesasdf:test-system :autolithin theactive image. During
test-openai-compatible-provider-bare-auth-selection, the lineregarding
main-dispatch '("auth")reachesmain--connect-application. Because*active-application*is thelive application, it calls
application-reconnectinstead of creatinga test application.
The test replaces
configuration-createwith a temporary testconfiguration, but the retained live application contains conversation
52X6kxF.application-reconnectconsequently attempts to load thatidentifier from the temporary configuration and signals
Conversation 52X6kxF does not exist.The smallest fix is to dynamically bind
*active-application*tonilaround the test'smain-dispatchcall. That makesmain--connect-applicationconstruct a new application using the testconfiguration. The dynamic binding restores the real application after
the test, so the test cannot replace or reconnect the active user
session.
A broader hardening change would run
self.commit's full ASDF suitein a disposable worker or subprocess. That isolates all tests from the
active agent's global state. The focused test fix should be applied
first because the test currently violates isolation even when invoked
by other in-process checks.
Add a regression case that runs the auth-selection test while a
distinct persisted application is dynamically active, then verifies
the test completes without loading that application's conversation
from the temporary test configuration.